希望能够改进一下对命令行工具的支持

geph4-vpn-helper我是搞不清楚这个到底该怎么用,目前就只看出来第一个参数是一个/etc/shells里面的壳。socks5还是没有tun device方便。
另外有没有可能通过geph4-client去实现账号注册、修改密码这一类操作?目前看来似乎必须使用GUI。

1 Like

/path/to/geph4-vpn-helper /path/to/geph4-client connect --stdio-vpn xxxxxxxxx
參考 #1694 的使用教學

可以在cli上完成帳號的註冊(只是要借助curl那些工具還有steps有點多),但不能改密碼


# geph4-vpn-helper /bin/bash geph4-client connect --stdio-vpn --username x --password x

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

RTNETLINK answers: No such file or directory

Error: ipv4: FIB table does not exist.

Flush terminated

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

ip6tables: Bad rule (does a matching rule exist in that chain?).

ip6tables: No chain/target/match by that name.

/sbin/geph4-client: /sbin/geph4-client: cannot execute binary file

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Kind(UnexpectedEof)', geph4-vpn-helper/src/linux.rs:118:67

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Aborted (core dumped)

# geph4-vpn-helper geph4-client connect --stdio-vpn --username x --password x

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

RTNETLINK answers: No such file or directory

Error: ipv4: FIB table does not exist.

Flush terminated

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

ip6tables: Bad rule (does a matching rule exist in that chain?).

ip6tables: No chain/target/match by that name.

su: failed to execute geph4-client: No such file or directory

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Kind(UnexpectedEof)', geph4-vpn-helper/src/linux.rs:118:67

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Aborted (core dumped)

然后我把geph4-client的路径添加到/etc/shells里面:


$ sudo geph4-vpn-helper /bin/bash geph4-client connect --stdio-vpn --username x --password x

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

RTNETLINK answers: No such file or directory

Error: ipv4: FIB table does not exist.

Flush terminated

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

ip6tables: Bad rule (does a matching rule exist in that chain?).

ip6tables: No chain/target/match by that name.

bash: geph4-client: Permission denied

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Kind(UnexpectedEof)', geph4-vpn-helper/src/linux.rs:118:67

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Aborted

$ sudo geph4-vpn-helper geph4-client connect --stdio-vpn --username x --password x

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

RTNETLINK answers: No such file or directory

Error: ipv4: FIB table does not exist.

Flush terminated

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

iptables: No chain/target/match by that name.

ip6tables: Bad rule (does a matching rule exist in that chain?).

ip6tables: No chain/target/match by that name.

su: failed to execute geph4-client: Permission denied

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Kind(UnexpectedEof)', geph4-vpn-helper/src/linux.rs:118:67

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Aborted

不知道这个到底如何解决

是不是要給個權限呢??

已经是root了啊,还需要哪个权限?
Edit:哦nobody啊,我试试

試試ls -l `which geph4-client`

-rwxr-xr-x 1 root root /sbin/geph4-client

sudo /path/to/geph4-vpn-helper /path/to/geph4-client connect --username xxxx --password xxxx --exit-server xxxx --stdio-vpn --dns-listen 127.0.0.1:15353 --credential-cache /tmp/geph4-credentials.db

我用這個去連是沒有問題的,至於你那個為什麼出問題,我等下去裝個linux(話說你是什麼系統)測試一下,或者等晚點開發者來解決

我是Manjaro,用AUR安装的geph4-git
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=geph4-git

我遲點去裝一個測試一下,或者等今晚開發者解決

干我忘记给geph-client用完整路径了,目前提示credentials的权限问题,应该能搞定了

你再試試,如果能用的話我就不裝那個系統了

試一下加個 --credential-cache /tmp/geph4-credentials.db

试了下面这个,能用

sudo geph4-vpn-helper `which geph4-client` connect --stdio-vpn --username x --password x --credential-cache /tmp/geph4-credentials.db --dns-listen 127.0.0.1:15353

回头我去编辑一下AUR

1 Like

問個題外話,是不是你用的linux不用寫./xxx直接寫xxx就能用當前目錄下的xxx呀,如果是的話我覺得可能是當前目錄也有個xxx才出現權限問題的

用AUR直接装到/sbin里面了,属于$PATH

之前沒看到你這裡寫錯了,多了一個/bin/bash

Arch Linux里面的/sbin是symlink到/usr/bin,详见这里