openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.95k stars 3.46k forks source link

Shadowsocks-Libev: Not Working in SNAPSHOT and 18.06-SNAPSHOT #6113

Closed TingyiChen closed 6 years ago

TingyiChen commented 6 years ago

Maintainer: @yousong Environment: ARCH: MIPS Model: Xiaomi Mi Router 3G OpenWRT Version: 2018-05-23 Snapshot or 18.06-SNAPSHOT built at commit a88ff7bf5b77fbde16c3c8d701170f111a5e984f

Description: When configured shadowsocks server config in luci app,in LOCAL Instances menu no server valid to choose for any instance.

Log:

Thu May 24 14:58:24 2018 daemon.err sslocal: Missing parameter(s): -s -p -u -b -k -m
Thu May 24 14:58:24 2018 daemon.err sslocal: Usage: /usr/bin/sslocal [options] Options:     -s,--server_addr server address     -p,--server_port server port    -u,--local_addr  local Used address     -b,--local_port  local Binding port     -k,--password    your password  -m,--method  encryption algorithm(aes-*-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)    -d,--daemon  run as daemon  -l,--log_level   log level(0-7), default is LOG_NOTICE  -h,--help    print this help
Thu May 24 14:58:24 2018 daemon.info procd: Instance sslocal::instance1 s in a crash loop 6 crashes, 0 seconds since last crash

_20180524231247

yousong commented 6 years ago

Please paste your uci config with the server host name and password clipped out. Thank you

yousong commented 6 years ago

Please make sure you are using shadowsocks-libev packaged in this repo. The log looks suspicious to me as the binary is supposed to be /usr/bin/ss-local, not sslocal

TingyiChen commented 6 years ago

I directly used ./script/feeds update -a to get source,should using source from this repo

TingyiChen commented 6 years ago

config file:

config ss_local
    option disabled '1'
    option server 'sss0'
    option local_address '0.0.0.0'
    option local_port '1080'
    option timeout '30'

config ss_tunnel
    option disabled '1'
    option server 'sss0'
    option local_address '0.0.0.0'
    option local_port '1090'
    option tunnel_address 'example.com:80'
    option mode 'tcp_and_udp'
    option timeout '60'

config ss_redir 'hi'
    option server 'sss0'
    option local_address '0.0.0.0'
    option local_port '1100'
    option mode 'tcp_and_udp'
    option timeout '60'
    option fast_open '1'
    option verbose '1'
    option reuse_port '1'

config ss_redir 'hj'
    option disabled '1'
    option server 'sss0'
    option local_address '0.0.0.0'
    option local_port '1100'
    option mode 'tcp_and_udp'
    option timeout '60'
    option fast_open '1'
    option verbose '1'
    option reuse_port '1'

config ss_rules 'ss_rules'
    option disabled '1'
    option redir_tcp 'hi'
    option redir_udp 'hi'
    option src_default 'checkdst'
    option dst_default 'bypass'
    option local_default 'checkdst'
    list src_ips_forward '192.168.1.4'
    list dst_ips_forward '8.8.8.8'

config server 'sss0'
    option server '*********'
    option server_port '9999'
    option method 'salsa20'
    option password '*************'

config ss_server
    option disabled '1'
    option server_port '9001'
    option password '********'
    option method 'aes-256-cfb'
    option bind_address '192.168.7.72'
yousong commented 6 years ago

The config should have name shadowsocks-libev and it looks good to me. But after searching for the strings in the log, I am quite sure it's from a variant named shadowsocks-tiny and packaged also in this repo as shadowsocks-client. This variant only provides sslocal binary.

If shadowsocks-libev is correctly installed, please share the output of /etc/init.d/shadowsocks-libev restart and ubus call service list '{"name": "shadowsocks-libev", "verbose": true}'. If nothing fruitful comes out, it's better if we have a remote screen sharing session. Thank you.

yousong commented 6 years ago

@TingyiChen , any updates?

TingyiChen commented 6 years ago

Seems can run now but i can't select backend server for ss-redir in luci config...

TingyiChen commented 6 years ago

ss

yousong commented 6 years ago

@TingyiChen , please try the fix in commit openwrt/luci@402ad57. The change can be applied quickly on your rootfs to /usr/lib/lua/luci/models/shadowsocks-libev.lua, then remove cache by rm -rf /tmp/luci-*.

Feel free to report back here if the same issue still persists. Thank you for your time.

TingyiChen commented 6 years ago

Confirmed works now.Thanks

kevinqiu0098 commented 6 years ago

@yousong i was installed opnewrt v18.06 to my router netgear r6220 and i got some problems too ..i try but still cannot fix it hope you can help app seems install well i can run also but i can't open google though 1

yousong commented 6 years ago

Please open a new issue. With additional information posted above.