Remove tls only settings: serverName, fingerprint

This commit is contained in:
Samuel Huang
2024-09-21 23:01:30 +10:00
parent f5b09715bc
commit 5aa53e9b3e
4 changed files with 9 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ Jusers=`jq -nc --arg uuid "${id}" '. += {"id":$uuid, "encryption":"none", "level
Jvnext=`jq -nc --arg host "${host}" --arg port "${port}" --argjson juser "${Jusers}" \
'. += {"address":$host, "port":($port | tonumber), "users":[$juser]}' `
JstreamSettings=`jq -nc --arg serverName "${serverName}" --arg fingerprint "${fingerprint}" --arg path "${path}" \
JstreamSettings=`jq -nc --arg path "${path}" \
'. += {"network":"splithttp", "security":"none", "splithttpSettings":{"path":$path}}' `
Jproxy=`jq -nc --arg host "${host}" --argjson jvnext "${Jvnext}" --argjson jstreamSettings "${JstreamSettings}" \

View File

@@ -42,7 +42,7 @@ Jusers=`jq -nc --arg uuid "${id}" '. += {"id":$uuid, "encryption":"none", "level
Jvnext=`jq -nc --arg host "${host}" --arg port "${port}" --argjson juser "${Jusers}" \
'. += {"address":$host, "port":($port | tonumber), "users":[$juser]}' `
JstreamSettings=`jq -nc --arg serverName "${serverName}" --arg fingerprint "${fingerprint}" --arg path "${path}" \
JstreamSettings=`jq -nc --arg path "${path}" \
'. += {"network":"ws", "security":"none", "wsSettings":{"path":$path}}' `
Jproxy=`jq -nc --arg host "${host}" --argjson jvnext "${Jvnext}" --argjson jstreamSettings "${JstreamSettings}" \

View File

@@ -2,7 +2,7 @@
usage() {
>&2 echo "VMESS-WS-PLAIN proxy builder"
>&2 echo "Usage: proxy-mpw <id@domain.com:443:/websocket>"
>&2 echo "Usage: proxy-mwp <id@domain.com:443:/websocket>"
}
if [ -z "$1" ]; then
@@ -45,7 +45,7 @@ Jusers=`jq -nc --arg uuid "${id}" '. += {"id":$uuid, "encryption":"none", "level
Jvnext=`jq -nc --arg host "${host}" --arg port "${port}" --argjson juser "${Jusers}" \
'. += {"address":$host, "port":($port | tonumber), "users":[$juser]}' `
JstreamSettings=`jq -nc --arg serverName "${serverName}" --arg fingerprint "${fingerprint}" --arg path "${path}" \
JstreamSettings=`jq -nc --arg path "${path}" \
'. += {"network":"ws", "security":"none", "wsSettings":{"path":$path}}' `
Jproxy=`jq -nc --arg host "${host}" --argjson jvnext "${Jvnext}" --argjson jstreamSettings "${JstreamSettings}" \

View File

@@ -1,7 +1,8 @@
#!/bin/bash
usage() {
>&2 echo "Usage: proxy-tpw <password@domain.com:443:/websocket>"
>&2 echo "TROJAN-WS-PLAIN proxy builder"
>&2 echo "Usage: proxy-twp <password@domain.com:443:/websocket>"
}
if [ -z "$1" ]; then
@@ -19,9 +20,6 @@ port="${options[1]}"
path="${options[2]}"
passwd="${id}"
if [ -z "${serverName}" ]; then serverName=${host}; fi
if [ -z "${fingerprint}" ]; then fingerprint="safari"; fi
if [ -z "${passwd}" ]; then
>&2 echo "Error: password undefined."
usage
@@ -40,10 +38,12 @@ fi
if ! [ "${port}" -eq "${port}" ] 2>/dev/null; then >&2 echo "Port number must be numeric"; exit 1; fi
# User settings
Jservers=`jq -nc --arg host "${host}" --arg port "${port}" --arg passwd "${passwd}" \
'. += {"address":$host, "port":($port | tonumber), "password":$passwd}' `
JstreamSettings=`jq -nc --arg serverName "${serverName}" --arg fingerprint "${fingerprint}" --arg path "${path}" \
# Stream Settings
JstreamSettings=`jq -nc --arg path "${path}" \
'. += {"network":"ws", "security":"none", "wsSettings":{"path":$path}}' `
Jproxy=`jq -nc --arg host "${host}" --argjson jservers "${Jservers}" --argjson jstreamSettings "${JstreamSettings}" \