feat(proxy): add VLESS/Xray proxy configuration and update Docker setup
This commit is contained in:
@@ -7,10 +7,25 @@ if [ ! -f "$sources" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sed -i \
|
||||
-e 's|https\?://deb\.debian\.org/debian|http://mirror.arvancloud.ir/debian|g' \
|
||||
-e 's|https\?://security\.debian\.org/debian-security|http://mirror.arvancloud.ir/debian|g' \
|
||||
-e 's| bookworm-updates||g' \
|
||||
"$sources"
|
||||
debian_mirror="${DEBIAN_APT_MIRROR:-}"
|
||||
security_mirror="${DEBIAN_SECURITY_APT_MIRROR:-}"
|
||||
disable_updates="${DEBIAN_APT_DISABLE_UPDATES:-false}"
|
||||
|
||||
sed -i '/mirror\.arvancloud\.ir\/debian-security/d' "$sources"
|
||||
if [ -n "$debian_mirror" ]; then
|
||||
sed -i \
|
||||
-e "s|^URIs: https\\?://deb\\.debian\\.org/debian$|URIs: $debian_mirror|g" \
|
||||
"$sources"
|
||||
fi
|
||||
|
||||
if [ -n "$security_mirror" ]; then
|
||||
sed -i \
|
||||
-e "s|^URIs: https\\?://deb\\.debian\\.org/debian-security$|URIs: $security_mirror|g" \
|
||||
-e "s|^URIs: https\\?://security\\.debian\\.org/debian-security$|URIs: $security_mirror|g" \
|
||||
"$sources"
|
||||
fi
|
||||
|
||||
case "$disable_updates" in
|
||||
1|true|TRUE|yes|YES)
|
||||
sed -i -e '/^Suites:/ s| bookworm-updates||g' "$sources"
|
||||
;;
|
||||
esac
|
||||
|
||||
234
docker/xray/config.example.json
Normal file
234
docker/xray/config.example.json
Normal file
@@ -0,0 +1,234 @@
|
||||
{
|
||||
"log": {},
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "socks",
|
||||
"settings": {
|
||||
"userLevel": 8,
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
},
|
||||
"protocol": "socks",
|
||||
"port": 55869,
|
||||
"listen": "127.0.0.1",
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"tls",
|
||||
"http",
|
||||
"quic"
|
||||
],
|
||||
"domainsExcluded": [
|
||||
"courier.push.apple.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "directSocks",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"userLevel": 8,
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
},
|
||||
"port": 1087,
|
||||
"listen": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"tag": "api",
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"address": "[::1]"
|
||||
},
|
||||
"port": 55870,
|
||||
"listen": "[::1]"
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"mux": {
|
||||
"concurrency": 50,
|
||||
"enabled": false,
|
||||
"xudpConcurrency": 128,
|
||||
"xudpProxyUDP443": "allow"
|
||||
},
|
||||
"streamSettings": {
|
||||
"xHttpSettings": {
|
||||
"mode": "auto",
|
||||
"path": "/",
|
||||
"host": "main.treenix-ping.com",
|
||||
"extra": {
|
||||
"scMinPostsIntervalMs": "30",
|
||||
"xPaddingBytes": "100-1000",
|
||||
"scMaxEachPostBytes": "1000000"
|
||||
}
|
||||
},
|
||||
"network": "xhttp",
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"allowInsecure": false,
|
||||
"serverName": "main.treenix-ping.com",
|
||||
"alpn": [
|
||||
"h2",
|
||||
"http/1.1"
|
||||
],
|
||||
"fingerprint": "chrome"
|
||||
}
|
||||
},
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"port": 443,
|
||||
"address": "01d.ir",
|
||||
"users": [
|
||||
{
|
||||
"flow": "",
|
||||
"level": 8,
|
||||
"encryption": "mlkem768x25519plus.native.0rtt.Bf9R7vF7RcUZMTcA2Xa3RG0L85xr8QLVLbnzZaHcylA",
|
||||
"email": "",
|
||||
"id": "b7387661-1c9d-4f0b-9862-801cb5fa5a2c"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag": "proxy"
|
||||
},
|
||||
{
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"tcpNoDelay": true
|
||||
}
|
||||
},
|
||||
"protocol": "freedom",
|
||||
"settings": {
|
||||
"fragment": {
|
||||
"length": "80-250",
|
||||
"interval": "10-100",
|
||||
"packets": "tlshello"
|
||||
},
|
||||
"userLevel": 8
|
||||
},
|
||||
"tag": "fragment"
|
||||
}
|
||||
],
|
||||
"api": {
|
||||
"tag": "api",
|
||||
"services": [
|
||||
"StatsService"
|
||||
]
|
||||
},
|
||||
"dns": {
|
||||
"disableFallbackIfMatch": true,
|
||||
"hosts": {
|
||||
"dns.quad9.net": [
|
||||
"9.9.9.9",
|
||||
"149.112.112.112",
|
||||
"2620:fe::fe",
|
||||
"2620:fe::9"
|
||||
],
|
||||
"dns.cloudflare.com": [
|
||||
"104.16.132.229",
|
||||
"104.16.133.229",
|
||||
"2606:4700::6810:84e5",
|
||||
"2606:4700::6810:85e5"
|
||||
],
|
||||
"dns.google": [
|
||||
"8.8.8.8",
|
||||
"8.8.4.4",
|
||||
"2001:4860:4860::8888",
|
||||
"2001:4860:4860::8844"
|
||||
],
|
||||
"common.dot.dns.yandex.net": [
|
||||
"77.88.8.8",
|
||||
"77.88.8.1",
|
||||
"2a02:6b8::feed:0ff",
|
||||
"2a02:6b8:0:1::feed:0ff"
|
||||
],
|
||||
"cloudflare-dns.com": [
|
||||
"104.16.248.249",
|
||||
"104.16.249.249",
|
||||
"2606:4700::6810:f8f9",
|
||||
"2606:4700::6810:f9f9"
|
||||
],
|
||||
"dns.alidns.com": [
|
||||
"223.5.5.5",
|
||||
"223.6.6.6",
|
||||
"2400:3200::1",
|
||||
"2400:3200:baba::1"
|
||||
],
|
||||
"one.one.one.one": [
|
||||
"1.1.1.1",
|
||||
"1.0.0.1",
|
||||
"2606:4700:4700::1111",
|
||||
"2606:4700:4700::1001"
|
||||
],
|
||||
"dot.pub": [
|
||||
"1.12.12.12",
|
||||
"120.53.53.53"
|
||||
]
|
||||
},
|
||||
"disableCache": true,
|
||||
"tag": "dnsQuery",
|
||||
"disableFallback": true,
|
||||
"queryStrategy": "UseIP",
|
||||
"servers": [
|
||||
{
|
||||
"address": "8.8.8.8",
|
||||
"skipFallback": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"stats": {},
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
{
|
||||
"outboundTag": "api",
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"api"
|
||||
],
|
||||
"ruleTag": "rule-0"
|
||||
},
|
||||
{
|
||||
"outboundTag": "proxy",
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"dnsQuery"
|
||||
],
|
||||
"ruleTag": "rule-1"
|
||||
},
|
||||
{
|
||||
"outboundTag": "direct",
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"directSocks"
|
||||
],
|
||||
"ruleTag": "rule-2"
|
||||
}
|
||||
],
|
||||
"balancers": []
|
||||
},
|
||||
"policy": {
|
||||
"system": {
|
||||
"statsInboundUplink": true,
|
||||
"statsInboundDownlink": true,
|
||||
"statsOutboundDownlink": true,
|
||||
"statsOutboundUplink": true
|
||||
},
|
||||
"levels": {
|
||||
"8": {
|
||||
"uplinkOnly": 1,
|
||||
"statsUserUplink": false,
|
||||
"handshake": 4,
|
||||
"bufferSize": 0,
|
||||
"connIdle": 30,
|
||||
"downlinkOnly": 1,
|
||||
"statsUserDownlink": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"transport": {}
|
||||
}
|
||||
Reference in New Issue
Block a user