Skip to content

Commit

Permalink
update clients dns
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed Dec 31, 2019
1 parent 35cc43c commit 1b7042f
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 48 deletions.
15 changes: 11 additions & 4 deletions config/client/h2.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/http.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/kcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/quic.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/tcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/ws.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
15 changes: 11 additions & 4 deletions config/client/ws_tls.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,24 @@
],
"dns": {
"servers": [
"1.1.1.1",
"1.0.0.1",
{
"address": "119.29.29.29",
"port": 53,
"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.4.4",
"localhost"
]
},
Expand Down
25 changes: 6 additions & 19 deletions src/download-v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ _get_latest_version() {

_download_v2ray_file() {
_get_latest_version
[[ -d /tmp/v2ray ]] && rm -rf /tmp/v2ray
mkdir -p /tmp/v2ray
v2ray_tmp_file="/tmp/v2ray/v2ray.zip"
v2ray_tmp_file="/tmp/v2ray.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
Expand All @@ -26,26 +24,15 @@ _download_v2ray_file() {
" && exit 1
fi

unzip $v2ray_tmp_file -d "/tmp/v2ray/"
mkdir -p /usr/bin/v2ray
cp -f "/tmp/v2ray/v2ray" "/usr/bin/v2ray/v2ray"
chmod +x "/usr/bin/v2ray/v2ray"
unzip -o $v2ray_tmp_file -d "/usr/bin/v2ray/"
chmod +x /usr/bin/v2ray/{v2ray,v2ctl}
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() {
if [[ $systemd ]]; then
cp -f "/tmp/v2ray/systemd/v2ray.service" "/lib/systemd/system/"
sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service
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
cp -f "/usr/bin/v2ray/systemd/v2ray.service" "/lib/systemd/system/"
sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service
systemctl enable v2ray
}

_update_v2ray_version() {
Expand Down
2 changes: 1 addition & 1 deletion v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1

_version="v3.28"
_version="v3.29"

cmd="apt-get"

Expand Down

0 comments on commit 1b7042f

Please sign in to comment.