mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-17 12:44:38 +03:00
Remove tls only settings: serverName, fingerprint
This commit is contained in:
@@ -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}" \
|
||||
|
||||
@@ -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}" \
|
||||
|
||||
@@ -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}" \
|
||||
|
||||
10
proxy-twp.sh
10
proxy-twp.sh
@@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user