diff --git a/proxy-lsp.sh b/proxy-lsp.sh index 72927a0..7f7d6cf 100755 --- a/proxy-lsp.sh +++ b/proxy-lsp.sh @@ -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}" \ diff --git a/proxy-lwp.sh b/proxy-lwp.sh index 7fd9392..5718e97 100755 --- a/proxy-lwp.sh +++ b/proxy-lwp.sh @@ -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}" \ diff --git a/proxy-mwp.sh b/proxy-mwp.sh index 09ca28b..9f917f1 100755 --- a/proxy-mwp.sh +++ b/proxy-mwp.sh @@ -2,7 +2,7 @@ usage() { >&2 echo "VMESS-WS-PLAIN proxy builder" - >&2 echo "Usage: proxy-mpw " + >&2 echo "Usage: proxy-mwp " } 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}" \ diff --git a/proxy-twp.sh b/proxy-twp.sh index 4ef40ca..ede89e2 100755 --- a/proxy-twp.sh +++ b/proxy-twp.sh @@ -1,7 +1,8 @@ #!/bin/bash usage() { - >&2 echo "Usage: proxy-tpw " + >&2 echo "TROJAN-WS-PLAIN proxy builder" + >&2 echo "Usage: proxy-twp " } 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}" \