diff --git a/.gitignore b/.gitignore index 6282f46..661c60c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ build .directory .vscode -cgproxy2.sh diff --git a/cgnoproxy.sh b/cgnoproxy.sh index fa0d194..e66a182 100644 --- a/cgnoproxy.sh +++ b/cgnoproxy.sh @@ -11,6 +11,6 @@ else fi # test attach success or not -[[ -z "$attached" ]] && echo "config error" && exit 1 +[[ -z "$attached" ]] && echo "attach error" && exit 1 exec "$@" \ No newline at end of file diff --git a/cgproxy.sh b/cgproxy.sh index 003c92c..beeeb52 100644 --- a/cgproxy.sh +++ b/cgproxy.sh @@ -11,6 +11,6 @@ else fi # test attach success or not -[[ -z "$attached" ]] && echo "config error" && exit 1 +[[ -z "$attached" ]] && echo "attach error" && exit 1 exec "$@" \ No newline at end of file diff --git a/readme.md b/readme.md index 222768c..9564f53 100644 --- a/readme.md +++ b/readme.md @@ -149,10 +149,10 @@ sudo systemctl restart cgproxy.service - `cgattach` attach pid to specific cgroup, and has *suid* bit set by default, be careful to use on multi-user server for securiry. To avoid this situation, you can remove the *suid* bit , then it will fallback to use *sudo*, with *visudo* you can restrict permission or set NOPASSWD for youself. -- v2ray TPROXY need root or special permiassion +- v2ray TPROXY need root or special permission ```bash - sudo setcap "cap_net_bind_service=+ep cap_net_admin=+ep" /usr/lib/v2ray/v2ray + sudo setcap "cap_net_admin,cap_net_bind_service=ep" /usr/lib/v2ray/v2ray ``` ## TIPS