cghdev / gotunl Goto Github PK
View Code? Open in Web Editor NEWCommand line client for Pritunl
Command line client for Pritunl
Hello !
First of all, very nice job for coding what everybody wants ๐๐ป
I just have an issue on the login part that maybe you have encountered before :
{401 Unauthorized 401 HTTP/1.1 1 1 map[Content-Length:[0] Date:[Wed, 12 Aug 2020 10:11:25 GMT]] {} 0 [] false false map[] 0xc00017a000 <nil>}
This error is occurring on the login request within your makeReq() called from ConnectProfile(). At first, I was just not getting any error message, I was just launching the app, writing my credentials, but noting was happening and no connection was established.
So I just added a little print in your code to see what was going on right there :
And you saw the result ๐ฌ
Any ideas on what could be the problem here ? ๐๐ป
EDIT: I also saw that you are sending this data as request body :
{ "id": "...", "reconnect": true, "timeout": true, "username":"pritunl", "password":"789715", "data":"..." }
Is that normal that my username is pritunl? Shouldn't it be the one contained in my pritunl .conf file ? ๐ค
Simply add a line
darwin:
@for GOARCH in ${ARCHS}; do \
echo "Building for darwin $${GOARCH} ..." ; \
mkdir -p ${TARGET}/gotunl-darwin-$${GOARCH} ; \
GOOS=darwin GOARCH=$${GOARCH} go build -trimpath -ldflags=${LDFLAGS} -o ${TARGET}/gotunl-darwin-$${GOARCH}/gotunl ; \
done; \
# *Here*
lipo -create -output ${TARGET}/gotunl-darwin-universal ${TARGET}/gotunl-darwin-amd64/gotunl ${TARGET}/gotunl-darwin-arm64/gotunl
echo "Done."
Ability to connect via CLI just like I'm able to connect via the GUI
./gotunl -c "pritunl-dev"
Enter the username: user
Enter the PIN: *************
Enter the OTP: ******
Errors out without any useful information. Didn't find anything in syslog either.
./gotunl -c "pritunl-dev"
2020/06/30 17:01:38 exit status 36
gotunl -v
1.2.1
system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.15.6 (19G46c)
Kernel Version: Darwin 19.6.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name:
User Name:
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 12 days 10:01
Pritunl version: v1.0.2440.93
{
"name": "pritunl-dev",
"wg": false,
"organization_id": "*****************",
"organization": "pritunl",
"server_id": "************************",
"server": "pritunl-dev",
"user_id": "**************",
"user": "******************",
"pre_connect_msg": null,
"password_mode": "otp_pin",
"token": false,
"token_ttl": 172800,
"disable_reconnect": null,
"autostart": null,
"sync_hosts": [
"https://my-pritunl-dev-server.net"
],
"sync_hash": "**************************",
"sync_secret": "*******************************",
"sync_token": "*************************************",
"server_public_key": [
"-----BEGIN RSA PUBLIC KEY-----",
...
"-----END RSA PUBLIC KEY-----"
],
"server_box_public_key": "*********************************************"
}
pritunl version:
v1.29.2435.70 eae1ce
This package has been recommended to me: I would suggest adding a homebrew formula to make it easy to adopt by MacOS users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.