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.83k stars 5.69k forks source link

setsockopt IP_TRANSPARENT: Operation not permitted #2783

Open maxisacoder opened 3 years ago

maxisacoder commented 3 years ago

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

3.3.5

What operating system are you using?

Ubuntu server 18.04

What did you do?

sudo shadowsocks-libev.ss-redir -v -s -p 30001 -l 1080 -k -m xchacha20-ietf-poly1305 -u -T

What did you expect to see?

ss-redir can start

What did you see instead?

 2020-12-24 13:51:25 INFO: initializing ciphers... xchacha20-ietf-poly1305
 2020-12-24 13:51:25 INFO: listening at 127.0.0.1:1080
 2020-12-24 13:51:25 ERROR: setsockopt IP_TRANSPARENT: Operation not permitted

What is your config in detail (with all sensitive info masked)?

configuration is above already a sudo user

madeye commented 3 years ago

CAP_NET_ADMIN cannot work with snap. You'd better follow the README to compile and install the app from source code.

ShanQincheng commented 3 years ago

CAP_NET_ADMIN cannot work with snap. You'd better follow the README to compile and install the app from source code.

In the README QUICK START, it's a recommended way for installing shadowsocks-libev by snap. I did a lot of google searches because of the problem "setsockopt IP_TRANSPARENT: Operation not permitted" and finally found this reply.