Merge pull request #4 from 233boy/master

update
pull/600/head
Blue planet 6 years ago committed by GitHub
commit 317817fb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      config/client/h2.json
  2. 15
      config/client/http.json
  3. 15
      config/client/kcp.json
  4. 15
      config/client/quic.json
  5. 15
      config/client/tcp.json
  6. 15
      config/client/ws.json
  7. 15
      config/client/ws_tls.json
  8. 20
      config/server/dynamic/http.json
  9. 20
      config/server/dynamic/kcp.json
  10. 20
      config/server/dynamic/quic.json
  11. 20
      config/server/dynamic/tcp.json
  12. 20
      config/server/dynamic/ws.json
  13. 20
      config/server/h2.json
  14. 20
      config/server/http.json
  15. 18
      config/server/kcp.json
  16. 18
      config/server/quic.json
  17. 20
      config/server/tcp.json
  18. 20
      config/server/ws.json
  19. 25
      src/download-v2ray.sh
  20. 2
      v2ray.sh

@ -90,17 +90,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -120,17 +120,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -91,17 +91,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -90,17 +90,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -80,17 +80,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -83,17 +83,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -93,17 +93,24 @@
], ],
"dns": { "dns": {
"servers": [ "servers": [
"1.1.1.1",
"1.0.0.1",
{ {
"address": "119.29.29.29", "address": "119.29.29.29",
"port": 53, "port": 53,
"domains": [ "domains": [
"geosite:cn" "geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
] ]
}, },
"8.8.8.8", "8.8.8.8",
"8.8.4.4",
"localhost" "localhost"
] ]
}, },

@ -97,18 +97,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -118,7 +116,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -167,9 +166,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -69,18 +69,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -90,7 +88,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -139,9 +138,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -71,18 +71,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -92,7 +90,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -141,9 +140,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -56,18 +56,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -77,7 +75,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -126,9 +125,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -59,18 +59,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -80,7 +78,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -129,9 +128,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -52,18 +52,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -73,7 +71,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -122,9 +121,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -70,18 +70,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -91,7 +89,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -140,9 +139,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -42,18 +42,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -63,7 +61,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -112,9 +111,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -43,18 +43,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -64,7 +62,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -113,9 +112,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -37,18 +37,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -58,7 +56,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -107,9 +106,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -37,18 +37,16 @@
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {
"domainStrategy": "UseIP"
},
"tag": "direct"
}, },
{ {
"protocol": "blackhole", "protocol": "blackhole",
"settings": {}, "settings": {},
"tag": "blocked" "tag": "blocked"
}, },
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{ {
"protocol": "mtproto", "protocol": "mtproto",
"settings": {}, "settings": {},
@ -58,7 +56,8 @@
// //
], ],
"dns": { "dns": {
"server": [ "servers": [
"https+local://1.1.1.1/dns-query",
"1.1.1.1", "1.1.1.1",
"1.0.0.1", "1.0.0.1",
"8.8.8.8", "8.8.8.8",
@ -107,9 +106,6 @@
"uplinkCapacity": 100, "uplinkCapacity": 100,
"downlinkCapacity": 100, "downlinkCapacity": 100,
"congestion": true "congestion": true
}, }
"sockopt": {
"tcpFastOpen": true
}
} }
} }

@ -15,9 +15,7 @@ _get_latest_version() {
_download_v2ray_file() { _download_v2ray_file() {
_get_latest_version _get_latest_version
[[ -d /tmp/v2ray ]] && rm -rf /tmp/v2ray v2ray_tmp_file="/tmp/v2ray.zip"
mkdir -p /tmp/v2ray
v2ray_tmp_file="/tmp/v2ray/v2ray.zip"
v2ray_download_link="https://github.com/v2ray/v2ray-core/releases/download/$v2ray_latest_ver/v2ray-linux-${v2ray_bit}.zip" v2ray_download_link="https://github.com/v2ray/v2ray-core/releases/download/$v2ray_latest_ver/v2ray-linux-${v2ray_bit}.zip"
if ! wget --no-check-certificate -O "$v2ray_tmp_file" $v2ray_download_link; then if ! wget --no-check-certificate -O "$v2ray_tmp_file" $v2ray_download_link; then
@ -26,26 +24,15 @@ _download_v2ray_file() {
" && exit 1 " && exit 1
fi fi
unzip $v2ray_tmp_file -d "/tmp/v2ray/" unzip -o $v2ray_tmp_file -d "/usr/bin/v2ray/"
mkdir -p /usr/bin/v2ray chmod +x /usr/bin/v2ray/{v2ray,v2ctl}
cp -f "/tmp/v2ray/v2ray" "/usr/bin/v2ray/v2ray"
chmod +x "/usr/bin/v2ray/v2ray"
echo "alias v2ray=$_v2ray_sh" >>/root/.bashrc echo "alias v2ray=$_v2ray_sh" >>/root/.bashrc
cp -f "/tmp/v2ray/v2ctl" "/usr/bin/v2ray/v2ctl"
chmod +x "/usr/bin/v2ray/v2ctl"
} }
_install_v2ray_service() { _install_v2ray_service() {
if [[ $systemd ]]; then cp -f "/usr/bin/v2ray/systemd/v2ray.service" "/lib/systemd/system/"
cp -f "/tmp/v2ray/systemd/v2ray.service" "/lib/systemd/system/" sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service
sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service systemctl enable v2ray
systemctl enable v2ray
else
apt-get install -y daemon
cp "/tmp/v2ray/systemv/v2ray" "/etc/init.d/v2ray"
chmod +x "/etc/init.d/v2ray"
update-rc.d -f v2ray defaults
fi
} }
_update_v2ray_version() { _update_v2ray_version() {

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.26" _version="v3.29"
cmd="apt-get" cmd="apt-get"

Loading…
Cancel
Save