Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry authored and Jerry committed Jan 25, 2017
2 parents f023542 + 29569ff commit e6ef2bb
Show file tree
Hide file tree
Showing 8 changed files with 7,775 additions and 76 deletions.
6 changes: 3 additions & 3 deletions shadowsocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
旨在分享linux下使用shadowsocks的经验。
## ss-iptables.sh:
依赖`shadowsocks-libev`,`ipset`(optional)。
直接执行 ./ss-iptables.sh 即可自动判断运行状态 也可以增加参数 /update/start/stop/restart 手动运行。
配置完成files/中的所有文件后,直接执行 sudo ./ss-iptables.sh 即可自动判断运行状态 也可以增加参数 /update/start/stop/restart 手动运行。
## files/ 中包含:
chinadns的init脚本
chinadns和shadowsocks-libev-nat的systemd脚本
桌面配置文件和图标
( 使用前置于合适的路径并修改 shadowsocks-iptables.desktop )。
( 使用前置于合适的路径并修改 )。


## ss-rules-without-ipset (目前还不能正常运作)
Expand Down
5 changes: 2 additions & 3 deletions shadowsocks/TODO
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
1.使用[email protected] https://github.com/shadowsocks/shadowsocks-libev/blob/master/debian/shadowsocks-libev-redir%40.service
2. 使用https://github.com/shadowsocks/luci-app-shadowsocks/blob/master/files/root/usr/bin/ss-rules-without-ipset替换shadowsocks-libev的ss-nat工具
3.......
1. 使用https://github.com/shadowsocks/luci-app-shadowsocks/blob/master/files/root/usr/bin/ss-rules-without-ipset替换shadowsocks-libev的ss-nat工具
2.......
50 changes: 0 additions & 50 deletions shadowsocks/files/etc/init.d/chinadns

This file was deleted.

16 changes: 16 additions & 0 deletions shadowsocks/files/etc/systemd/system/chinadns.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Chinadns
After=network.target

[Service]
Type=simple
User=root
ExecStart=/bin/sh -c '/usr/bin/chinadns \
-m \
-b 127.0.0.2 \
-c /usr/share/chnroute.txt \
1> /var/log/chinadns.log \
2> /var/log/chinadns.err.log'

[Install]
WantedBy=multi-user.target
27 changes: 27 additions & 0 deletions shadowsocks/files/etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.

[Unit]
Description=Shadowsocks-Libev Custom Client Service Redir Mode for %I
Documentation=man:ss-redir(1)
After=network.target

[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/bin/sh -c '/usr/bin/ss-redir \
-c /etc/shadowsocks-libev/%i.json \
> /var/log/ss-redir.log \
2>&1'

[Install]
WantedBy=multi-user.target

24 changes: 24 additions & 0 deletions shadowsocks/files/etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.

[Unit]
Description=Shadowsocks-Libev Custom Client Service Redir Mode for %I
Documentation=man:ss-redir(1)
After=network.target

[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json

[Install]
WantedBy=multi-user.target

Loading

0 comments on commit e6ef2bb

Please sign in to comment.