From 1a2d8009aaf65b7c1d1441d1ee3ff515e8094e91 Mon Sep 17 00:00:00 2001 From: BOYPT Date: Sat, 23 Feb 2019 19:50:28 +0800 Subject: [PATCH] replace # with _ --- config/client/h2.json | 12 ++++++------ config/client/http.json | 8 ++++---- config/client/kcp.json | 8 ++++---- config/client/quic.json | 8 ++++---- config/client/tcp.json | 8 ++++---- config/client/ws.json | 8 ++++---- config/client/ws_tls.json | 8 ++++---- config/server/dynamic/http.json | 6 +++--- config/server/dynamic/kcp.json | 6 +++--- config/server/dynamic/quic.json | 6 +++--- config/server/dynamic/tcp.json | 6 +++--- config/server/dynamic/ws.json | 6 +++--- config/server/h2.json | 6 +++--- config/server/http.json | 6 +++--- config/server/kcp.json | 6 +++--- config/server/quic.json | 6 +++--- config/server/tcp.json | 6 +++--- config/server/ws.json | 6 +++--- src/download-ssray.sh | 2 +- src/ssray.conf | 6 +++--- src/vmess-config.sh | 18 +++++++++--------- 21 files changed, 76 insertions(+), 76 deletions(-) diff --git a/config/client/h2.json b/config/client/h2.json index bdcf9d7..0e8bc45 100644 --- a/config/client/h2.json +++ b/config/client/h2.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] @@ -26,9 +26,9 @@ "security": "tls", "httpSettings": { "host": [ - "##H2DOMAIN##" + "__H2DOMAIN__" ], - "path": "##H2PATH##" + "path": "__H2PATH__" } }, "mux": { diff --git a/config/client/http.json b/config/client/http.json index d1aaf4e..a88b520 100644 --- a/config/client/http.json +++ b/config/client/http.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/client/kcp.json b/config/client/kcp.json index a1279a6..ddc0b87 100644 --- a/config/client/kcp.json +++ b/config/client/kcp.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/client/quic.json b/config/client/quic.json index 29c4fbc..ab58c7d 100644 --- a/config/client/quic.json +++ b/config/client/quic.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/client/tcp.json b/config/client/tcp.json index ef10735..103c692 100644 --- a/config/client/tcp.json +++ b/config/client/tcp.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/client/ws.json b/config/client/ws.json index c13c970..fafda6b 100644 --- a/config/client/ws.json +++ b/config/client/ws.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/client/ws_tls.json b/config/client/ws_tls.json index f1a81aa..4359df2 100644 --- a/config/client/ws_tls.json +++ b/config/client/ws_tls.json @@ -9,12 +9,12 @@ "settings": { "vnext": [ { - "address": "##VMADDR##", - "port": ##VMPORT##, + "address": "__VMADDR__", + "port": __VMPORT__, "users": [ { - "id": "##VMUSERID##", - "alterId": ##VMALTID##, + "id": "__VMUSERID__", + "alterId": __VMALTID__, "security": "auto" } ] diff --git a/config/server/dynamic/http.json b/config/server/dynamic/http.json index a971719..0965531 100644 --- a/config/server/dynamic/http.json +++ b/config/server/dynamic/http.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ], "detour": { diff --git a/config/server/dynamic/kcp.json b/config/server/dynamic/kcp.json index f67cab2..f2533c9 100644 --- a/config/server/dynamic/kcp.json +++ b/config/server/dynamic/kcp.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ], "detour": { diff --git a/config/server/dynamic/quic.json b/config/server/dynamic/quic.json index 11a4e7d..0f854ca 100644 --- a/config/server/dynamic/quic.json +++ b/config/server/dynamic/quic.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ], "detour": { diff --git a/config/server/dynamic/tcp.json b/config/server/dynamic/tcp.json index c28a249..fa6c603 100644 --- a/config/server/dynamic/tcp.json +++ b/config/server/dynamic/tcp.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ], "detour": { diff --git a/config/server/dynamic/ws.json b/config/server/dynamic/ws.json index 299110a..805ec2e 100644 --- a/config/server/dynamic/ws.json +++ b/config/server/dynamic/ws.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ], "detour": { diff --git a/config/server/h2.json b/config/server/h2.json index 9920894..4ef95d0 100644 --- a/config/server/h2.json +++ b/config/server/h2.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/config/server/http.json b/config/server/http.json index 9d90b20..c1009b3 100644 --- a/config/server/http.json +++ b/config/server/http.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/config/server/kcp.json b/config/server/kcp.json index 07a55fe..6478c3d 100644 --- a/config/server/kcp.json +++ b/config/server/kcp.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/config/server/quic.json b/config/server/quic.json index 022ccfa..9e0e44c 100644 --- a/config/server/quic.json +++ b/config/server/quic.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/config/server/tcp.json b/config/server/tcp.json index dc76dc6..c297a0a 100644 --- a/config/server/tcp.json +++ b/config/server/tcp.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/config/server/ws.json b/config/server/ws.json index 2d3ee11..e19e5dd 100644 --- a/config/server/ws.json +++ b/config/server/ws.json @@ -41,14 +41,14 @@ }, { "tag": "vmess-in", - "port": ##VMPORT##, + "port": __VMPORT__, "protocol": "vmess", "settings": { "clients": [ { - "id": "##VMUSERID##", + "id": "__VMUSERID__", "level": 1, - "alterId": ##VMALTID## + "alterId": __VMALTID__ } ] }, diff --git a/src/download-ssray.sh b/src/download-ssray.sh index 69685c4..5c12e52 100644 --- a/src/download-ssray.sh +++ b/src/download-ssray.sh @@ -37,7 +37,7 @@ _install_ssray_service() { if [[ $systemd ]]; then install -m644 /etc/v2ray/233boy/v2ray/src/ssray.service "/lib/systemd/system/" install -m644 /etc/v2ray/233boy/v2ray/src/ssray.conf /etc/v2ray/ - sed -i "s/##REMOTEPORT##/${ssrayport}/; s/##LOCALPORT##/${ssport}/; s/##OPTION##/${ssrayopt}/;" /etc/v2ray/ssray.conf + sed -i "s/__REMOTEPORT__/${ssrayport}/; s/__LOCALPORT__/${ssport}/; s/__OPTION__/${ssrayopt}/;" /etc/v2ray/ssray.conf systemctl enable ssray else $red 暂时不资瓷...$none diff --git a/src/ssray.conf b/src/ssray.conf index 8cb522e..89e7426 100644 --- a/src/ssray.conf +++ b/src/ssray.conf @@ -1,5 +1,5 @@ SS_REMOTE_HOST=0.0.0.0 -SS_REMOTE_PORT=##REMOTEPORT## +SS_REMOTE_PORT=__REMOTEPORT__ SS_LOCAL_HOST=127.0.0.1 -SS_LOCAL_PORT=##LOCALPORT## -SS_PLUGIN_OPTIONS="##OPTION##" +SS_LOCAL_PORT=__LOCALPORT__ +SS_PLUGIN_OPTIONS="__OPTION__" diff --git a/src/vmess-config.sh b/src/vmess-config.sh index 7143780..366b3e7 100644 --- a/src/vmess-config.sh +++ b/src/vmess-config.sh @@ -55,7 +55,7 @@ cp -f $v2ray_server_config_file $v2ray_server_config cp -f $v2ray_client_config_file $v2ray_client_config # change port, uuid, alterId -sed -i "s/##VMPORT##/$v2ray_port/; s/##VMUSERID##/$v2ray_id/; s/##VMALTID##/$alterId/" $v2ray_server_config +sed -i "s/__VMPORT__/$v2ray_port/; s/__VMUSERID__/$v2ray_id/; s/__VMALTID__/$alterId/" $v2ray_server_config # change dynamic port if [[ $v2ray_transport -ge 18 ]]; then @@ -66,11 +66,11 @@ fi # change domain and path, or header type case $v2ray_transport in 5) - sed -i "s/##H2DOMAIN##/$domain/" $v2ray_server_config + sed -i "s/__H2DOMAIN__/$domain/" $v2ray_server_config if [[ $is_path ]]; then - sed -i "s/##H2PATH##/$path/" $v2ray_server_config + sed -i "s/__H2PATH__/$path/" $v2ray_server_config else - sed -i "s/##H2PATH##//" $v2ray_server_config + sed -i "s/__H2PATH__//" $v2ray_server_config fi ;; 7 | 13 | 22 | 28) @@ -95,15 +95,15 @@ case $v2ray_transport in ;; esac -## change client config file +__ change client config file [[ -z $ip ]] && get_ip -sed -i "s/##VMADDR##/$ip/; s/##VMPORT##/$v2ray_port/; s/##VMUSERID##/$v2ray_id/; s/##VMALTID##/$alterId/" $v2ray_client_config +sed -i "s/__VMADDR__/$ip/; s/__VMPORT__/$v2ray_port/; s/__VMUSERID__/$v2ray_id/; s/__VMALTID__/$alterId/" $v2ray_client_config if [[ $v2ray_transport == [45] ]]; then - sed -i "s/##H2DOMAIN##/$domain/" $v2ray_client_config + sed -i "s/__H2DOMAIN__/$domain/" $v2ray_client_config if [[ $is_path ]]; then - sed -i "s/##H2PATH##/$path/" $v2ray_client_config + sed -i "s/__H2PATH__/$path/" $v2ray_client_config else - sed -i "s/##H2PATH##//" $v2ray_client_config + sed -i "s/__H2PATH__//" $v2ray_client_config fi fi