Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect configuration for shadowsocks-rust ss_tunnel #3646

Closed
ShadowOfTheDay opened this issue Nov 9, 2024 · 6 comments
Closed

Incorrect configuration for shadowsocks-rust ss_tunnel #3646

ShadowOfTheDay opened this issue Nov 9, 2024 · 6 comments
Labels

Comments

@ShadowOfTheDay
Copy link

Expected Behavior

According to the configuration of shadowsocks-rust, for tunnel mode, the forward_address and forward_port should be set.

Current Behavior

The current implementation of shadowsocks-rust in OpenMPTCProuter follows the configuration of shadowsocks-libev, forward address and port are configured in tunnel_address, which is not used by shadowsocks-rust. As a result, ss_tunnel will not start.

Steps to Reproduce the Problem

Keep the default setting of ss_tunnel.dns and it won't start. The following message can be found in the log.

daemon.info procd: Instance shadowsocks-rust::ss_tunnel.dns s in a crash loop 6 crashes, 0 seconds since last crash
@ShadowOfTheDay
Copy link
Author

ShadowOfTheDay commented Nov 18, 2024

Thanks! However, the fix seems to have introduced a new issue. When installing the new version, the following error was shown:

root@Openwrt:/tmp# opkg install shadowsocks-rust-config-nft_1.21.2-r1_x86_64.ipk
Installing shadowsocks-rust-config-nft (1.21.2-r1) to root...
Configuring shadowsocks-rust-config-nft.
uci: Entry not found
/etc/rc.common: eval: line 427: forward_port:uinteger: not found
/etc/rc.common: eval: line 427: forward_port:uinteger: not found
uci: Entry not found
/etc/rc.common: line 427: forward_port:uinteger: not found

The same error is shown when starting the service.

root@Openwrt:/tmp# /etc/init.d/shadowsocks-rust start
/etc/rc.common: eval: line 427: forward_port:uinteger: not found
/etc/rc.common: eval: line 427: forward_port:uinteger: not found
uci: Entry not found
/etc/rc.common: line 427: forward_port:uinteger: not found

Please let me know if any additional information is needed.

@Ysurac
Copy link
Owner

Ysurac commented Nov 18, 2024

Thanks, It's fixed. New Snapshot is compiling.

@ShadowOfTheDay
Copy link
Author

ShadowOfTheDay commented Nov 18, 2024

Thank you for the prompt update! I didn't notice it was due to the missing \.
I think there is one last issue here:

root@Openwrt:~# /usr/bin/sslocal -c /var/etc/shadowsocks-rust/ss_tunnel.dns.json
config integrity check failed, missing `forward_addr` in configuration

According to shadowsocks/shadowsocks-rust#1420, forward_address is only supported in the "extended configuration file format", which is able to define more than one server.

@Ysurac
Copy link
Owner

Ysurac commented Nov 18, 2024

Fixed again, this time it should work.

@ShadowOfTheDay
Copy link
Author

Thanks so much! ss_tunnel now works as expected.
The update of the init script seems to have broken other modes though.
Ysurac/openmptcprouter-feeds@96a10d8#diff-63666a25306c9ca1e04b565152d7e2a5a8852dd13d35499ba8ac5c18d9a85184R89
After commenting out this line, protocol is missing in the config of ss_redir (and likely other modes other than ss_local and ss_tunnel).

@Ysurac
Copy link
Owner

Ysurac commented Nov 24, 2024

Thanks it's fixed, this explain why it was not working correctly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants