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

Implement shadowsocks relay according to the wiki #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vmlinz
Copy link
Contributor

@vmlinz vmlinz commented Jun 18, 2015

I tried to implement the nat shadowsocks relay according to the official wiki:
https://github.com/shadowsocks/shadowsocks/wiki/Setup-a-Shadowsocks-relay

Please review this branch.

Thanks.

#!/bin/sh
#set -e

IPTABLES="/sbin/iptables"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

唯一担心的是事情时这个脚本不是 idempotent 的, 多次执行, iptable 里面会多出一些垃圾, 或者是报错。
然后如果修改了端口, 再次执行的话也会在iptable 中遗留之前的指令。
建议你参考 https://github.com/ftao/vpn-deploy-playbook/blob/master/roles/nat/templates/opt/easynat/setup_nat 中的做法, 自定义 chain 的方法。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ftao 谢谢,我今天测试的时候也发现,我要改端口,那nat规则里面还是会遗留之前的设置。如果上来就清空iptables好像也不对。我去看看你的easynat。

@ftao
Copy link
Owner

ftao commented Jul 5, 2015

any update ? 或者你先merge 了, 优化之后再提新的pull request ?

@vmlinz
Copy link
Contributor Author

vmlinz commented Jul 5, 2015

@ftao 我先再测试下,好像还有点问题

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

Successfully merging this pull request may close these issues.

2 participants