How to use Geph from terminal?

It looks like Geph's GUI is an Electron app (with an un-resizable main window).

Looking through the directory, there is geph-linux64-4.1.5/resources/app/binaries/linux-x64 which contains some binaries.

Is geph4-client the CLI version of the application? Is it possible to use geph4-client to connect/disconnect to the VPN from bash scripts?
What commands does the GUI use so the sequence could be replicated via CLI?

Thanks!

Yes.

1 Like

Yes

Yes

/path/to/geph4-client -h can print the help information.

For example, if you want to connect to the Japan exit server, you can use
/path/to/geph4-client connect --username xxx --password xxx --exit-server sosistab-jp-test.labooyah.be
And if you want to disconnect it, you can use
curl 127.0.0.1:9809/kill

1 Like

Geph2 was deprecated in favor of Geph4

但是geph4的wiki没有advanced usage的页面。

Thanks!
It can offer both SOCKS5 and HTTP proxy. Which one do you recommend to use with applications?
SOCKS5 is more secure and can handle UDP (so streaming, P2P, etc).
HTTP is faster but packets are transparent and susceptible to MITM attacks.
Is that right?

Also, localhost:9809 provides latency and tx/rx info. Is it possible to do some heuristics to select the server with the least number of connections and best performance? Does the GUI do such a thing or is it all manual?

Yes. Actually geph4-client does.

Theoretically speaking, socks5 is faster...
You -> socks5 -> geph4-client -> geph4-server -> website
You -> http -> socks5 -> geph4-client -> geph4-server -> website

2 Likes

So there is actually little use for http method unless the application is a bot or script which needs to directly access http packets.

AFAIK, the GUI client shows the link speed and latency but does not provide a "benchmark" on the endpoint address so the user selects the one with the least amount of users...
For VPN clients, sometimes there is a connect --fastest switch which auto-detects the best server to connect to.

1 Like

Do you mean auto-select the best exit server?

Yeah, I meant that.

For anyone wondering, the relevant command invocations can be found here
Especially startDaemon and stopDaemon functions.
Also, one needs to also issue a pac off (here) to update the browser after issuing the kill command to 127.0.0.1:9809. Same thing after starting the client (pac on).

Now, 2 questions:
1- How can we find out that the client is successfully connected? Since geph4-client doesn't exit and doesn't issue unix exit codes. Should we do periodically polling of 127.0.0.1:9809 from script?
2- There is no switch for global VPN option. Also even enabling it from GUI doesn't seem to work.

Yes

Doesn't work? Could you please provide more details?

version 4.1.5. When I activate global, the connection state immediately shows "disconnect"...I think this has to do with user elevation and sudo.
I just extracted the geph archive. Should I have given sudo rights to anything?

Can you try v4.1.7?