shadowsocks / shadowsocks-libev

Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust
https://github.com/shadowsocks/shadowsocks-rust
GNU General Public License v3.0
15.81k stars 5.7k forks source link

ss-redir -u cause `[udp] setsockopt IP_TRANSPARENT` in asus merlin. #704

Closed zw963 closed 8 years ago

zw963 commented 8 years ago

Route: ASUS AC66U (MIPS)

admin@RT-AC66U-20F0:/tmp/mnt/sda/entware/etc# ss-redir -v

shadowsocks-libev 2.4.5

  maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang <laokongzi@gmail.com>

  usage:

    ss-redir

       -s <server_host>           Host name or ip address of your remote server.
       -p <server_port>           Port number of your remote server.
       -l <local_port>            Port number of your local server.
       -k <password>              Password of your remote server.
       -m <encrypt_method>        Encrypt method: table, rc4, rc4-md5,
                                  aes-128-cfb, aes-192-cfb, aes-256-cfb,
                                  bf-cfb, camellia-128-cfb, camellia-192-cfb,
                                  camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb,
                                  rc2-cfb, seed-cfb, salsa20 and chacha20.

       [-a <user>]                Run as another user.
       [-f <pid_file>]            The file path to store pid.
       [-t <timeout>]             Socket timeout in seconds.
       [-c <config_file>]         The path to config file.
       [-n <number>]              Max number of open files.
       [-b <local_address>]       Local address to bind.

       [-u]                       Enable UDP relay,
                                  TPROXY is required in redir mode.
       [-U]                       Enable UDP relay and disable TCP relay.
       [-A]                       Enable onetime authentication.

       [-v]                       Verbose mode

Error

admin@RT-AC66U-20F0:/tmp/mnt/sda/entware/etc# ss-redir -c ./ss-redir1.json -u
 2016-07-05 18:12:09 INFO: initialize ciphers... aes-256-cfb
 2016-07-05 18:12:09 INFO: UDP relay enabled
 2016-07-05 18:12:09 ERROR: [udp] setsockopt IP_TRANSPARENT

Not -u provided is worked, thanks.

madeye commented 8 years ago

Make sure your kernel supports transparent proxy.

zw963 commented 8 years ago

@madeye , But ss-tunnel can worked with -u.

admin@RT-AC66U-20F0:/tmp/mnt/sda/entware/etc# ss-tunnel -c ./ss-redir1.json -L 8.8.8.8:53 -u
 2016-07-05 18:32:32 INFO: initialize ciphers... aes-256-cfb
 2016-07-05 18:32:32 INFO: UDP relay enabled
 2016-07-05 18:32:32 INFO: listening at 192.168.1.1:1082
madeye commented 8 years ago

They are totally different.