install-script
install-script copied to clipboard
config outbounds and routing for access to warp or tor
its good idea to add xray routing options to tp like what mhsanaei x-ui did. https://github.com/MHSanaei/3x-ui
so we can route our inbounds to different outbond for example tor for anonymous connection by https://github.com/FDX100/Auto_Tor_IP_changer (DANGEROUS --- it's possible to be flagged by DATA CENTER ) or for warp outbound
instead user tag for all inbounds you can use their ip and port like inbound-0.0.0.0:29954
and use their tag in routing of each nodes if their outbound was defined manually by pasting something like what i did below or auto something coded for warp or tor by yourself
"outbounds": [
{
"tag": "warp",
"protocol": "wireguard",
"settings": {
"mtu": 1420,
"secretKey": "8CBQxxKSomTQ4+THwEaNVuZgAFbudNZXtcJZLcseRWw=",
"address": [
"172.16.0.2",
"2606:4700:110:8287:766:a76e:6548:2d56"
],
"workers": 2,
"domainStrategy": "ForceIPv6v4",
"peers": [
{
"publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
"allowedIPs": [
"0.0.0.0/0",
"::/0"
],
"endpoint": "engage.cloudflareclient.com:2408",
"keepAlive": 0
}
],
"kernelMode": false
}
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"outboundTag": "blocked",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "blocked",
"protocol": [
"bittorrent"
]
},
{
"type": "field",
"outboundTag": "warp"
},
{
"type": "field",
"inboundTag": [
"inbound-0.0.0.0:29954"
],
"outboundTag": "warp"
}
]
}
Freedom Protocol Strategy - AsIs - UseIP - UseIPv4 - UseIPv6 :
in outbounds:
{
"tag": "IPv4",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv4"
}
}
and in routing we can redirect our desired websites to that outbound:
{
"type": "field",
"outboundTag": "IPv4",
"domain": [
"geosite:google",
"geosite:netflix"
]
}
for blocking private network or bittorent in routing:
{
"type": "field",
"outboundTag": "blocked",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "blocked",
"protocol": [
"bittorrent"
]
}
making your region ip or domains direct:
{
"type": "field",
"outboundTag": "direct",
"domain": [
"regexp:.*\\.ir$",
"regexp:.*\\.xn--mgba3a4f16a$",
"ext:geosite_IR.dat:ir"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"ext:geoip_IR.dat:ir"
]
}
block ads malware crypto and speedtest:
{
"type": "field",
"outboundTag": "blocked",
"domain": [
"geosite:category-ads-all",
"ext:geosite_IR.dat:category-ads-all",
"ext:geosite_IR.dat:malware",
"ext:geosite_IR.dat:phishing",
"ext:geosite_IR.dat:cryptominers",
"geosite:speedtest"
]
}
for filtering adult content and malware and family safety:
"dns": {
"servers": [
"1.1.1.3",
"1.0.0.3",
"2606:4700:4700::1113",
"2606:4700:4700::1003"
],
"queryStrategy": "UseIP"
}