Last active
March 22, 2018 02:50
-
-
Save techotaku/6bd6a8453b266aca1104775c1d5f945d to your computer and use it in GitHub Desktop.
V2Ray / ShadowsocksR init scripts and configurations for OpenWrt / LEDE.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"log": { | |
"access": "", | |
"error": "/var/log/v2ray/error.log", | |
"loglevel": "warning" | |
}, | |
"inbound": { | |
"port": 12345, | |
"protocol": "dokodemo-door", | |
"settings": { | |
"network": "tcp,udp", | |
"followRedirect": true | |
} | |
}, | |
"outbound": { | |
"protocol": "vmess", | |
"settings": { | |
"vnext": [ | |
{ | |
"address": "", | |
"port": , | |
"users": [ | |
{ | |
"id": "", | |
"alterId": , | |
"security": "" | |
} | |
] | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"security": "tls", | |
"tlsSettings": { | |
"serverName": "", | |
"allowInsecure": false | |
}, | |
"wsSettings": { | |
"connectionReuse": true, | |
"path": "/" | |
} | |
} | |
}, | |
"inboundDetour": [ | |
{ | |
"protocol": "socks", | |
"port": 1080, | |
"tag": "socks5", | |
"listen": "0.0.0.0", | |
"settings": { | |
"auth": "noauth", | |
"udp": true, | |
"ip": "192.168.1.1" | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# | |
# Copyright (C) 2017 Ian Li <OpenSource@ianli.xyz> | |
# | |
# This is free software, licensed under the GNU General Public License v3. | |
# See /LICENSE for more information. | |
# | |
START=90 | |
USE_PROCD=1 | |
start_service() { | |
procd_open_instance | |
procd_set_param respawn | |
procd_set_param command /usr/bin/ssr-redir -c /etc/shadowsocksr.json -l 1234 --mtu 1492 | |
procd_set_param file /etc/shadowsocksr.json | |
procd_set_param stdout 1 | |
procd_set_param stderr 1 | |
procd_set_param pidfile /var/run/ssr-redir.pid | |
procd_close_instance | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"server": "", | |
"server_port": , | |
"password": "", | |
"method": "none", | |
"protocol": "auth_chain_a", | |
"protocol_param": "", | |
"obfs": "tls1.2_ticket_auth", | |
"obfs_param": "", | |
"local_address": "0.0.0.0", | |
"timeout": 60, | |
"reuse_port": true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# | |
# Copyright (C) 2017 Ian Li <OpenSource@ianli.xyz> | |
# | |
# This is free software, licensed under the GNU General Public License v3. | |
# See /LICENSE for more information. | |
# | |
START=90 | |
USE_PROCD=1 | |
start_service() { | |
mkdir /var/log/v2ray > /dev/null 2>&1 | |
procd_open_instance | |
procd_set_param respawn | |
procd_set_param command /usr/bin/v2ray -config /etc/v2ray/config.json | |
procd_set_param file /etc/v2ray/config.json | |
procd_set_param stdout 1 | |
procd_set_param stderr 1 | |
procd_set_param pidfile /var/run/v2ray.pid | |
procd_close_instance | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment