Skip to content

Commit

Permalink
Merge pull request #94 from hezhijie0327/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
hezhijie0327 committed May 16, 2024
2 parents 15fae18 + 6b706a3 commit f6a1f12
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion v2ray/client_trojan.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
1 change: 0 additions & 1 deletion v2ray/client_vless.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
1 change: 0 additions & 1 deletion v2ray/client_vmess.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
1 change: 0 additions & 1 deletion v2ray/server_trojan.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
1 change: 0 additions & 1 deletion v2ray/server_vless.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
1 change: 0 additions & 1 deletion v2ray/server_vmess.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"loglevel": "info"
},
"dns": {
"clientIp": "127.0.0.1",
"disableCache": true,
"disableFallback": false,
"queryStrategy": "UseIP",
Expand Down
6 changes: 1 addition & 5 deletions v2ray/v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ function DownloadConfiguration() {
if [ "${DOWNLOAD_CONFIG:-true}" == "true" ]; then
curl ${CURL_OPTION:--4 -s --connect-timeout 15} "https://${CDN_PATH}/ZJDNS/main/v2ray/${RUNNING_MODE:-server}_${RUNTIME_PROTOCOL:-vmess}.json" > "${DOCKER_PATH}/conf/config.json" && sed -i "s/\"info\"/\"${LOG_LEVEL:-info}\"/g;s/demo.zhijie.online/${CUSTOM_SERVERNAME}/g;s/99235a6e-05d4-2afe-2990-5bc5cf1f5c52/${CUSTOM_UUID}/g;s/fullchain\.cer/${SSL_CERT/./\\.}/g;s/zhijie\.online\.key/${SSL_KEY/./\\.}/g" "${DOCKER_PATH}/conf/config.json"

if [ "${CUSTOM_CLIENT_IP:-auto}" != "" ]; then
sed -i "s|\"clientIp\": \"127.0.0.1\"|\"clientIp\": \"$(StaticIP=${CUSTOM_CLIENT_IP} && Type=${CUSTOM_CLIENT_IP_TYPE:-A} && GetWANIP)\"|g" "${DOCKER_PATH}/conf/config.json"
fi

if [ "${CUSTOM_DNS[*]}" != "" ]; then
JSON_STRING="" && for IP in "${CUSTOM_DNS[@]}"; do
IPADDR="" && IPADDR=$(echo ${IP} | cut -d "@" -f 1)
Expand All @@ -135,7 +131,7 @@ function DownloadConfiguration() {
CLIENT="" && CLIENT=$(echo ${IP} | grep '%' | cut -d "%" -f 2)

ADDITIONAL="" && if [ "${CLIENT}" != "" ]; then
ADDITIONAL=', "clientIp": "'${CLIENT}'"'
ADDITIONAL=', "clientIp": "'$(StaticIP=${CLIENT} && Type=${CUSTOM_CLIENT_IP_TYPE:-A} && GetWANIP)'"'
fi

if [ "${EXPECT}" != "" ]; then
Expand Down

0 comments on commit f6a1f12

Please sign in to comment.