refactor: restructure inventory, split roles and add new services
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"observatory": {
|
||||
"subjectSelector": ["vless-"],
|
||||
"probeUrl": "https://www.google.com/generate_204",
|
||||
"probeInterval": "30s",
|
||||
"enableConcurrency": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"outbounds": [
|
||||
{% for item in xray_outbounds %}
|
||||
{
|
||||
"tag": "vless-{{ item.tag }}",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "{{ item.address }}",
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "{{ xray_id }}",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"encryption": "{{ xray_encryption }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"domainStrategy": "UseIPv4"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "xhttp",
|
||||
"xhttpSettings": {
|
||||
"path": "{{ xray_xhttp_path }}",
|
||||
"mode": "stream-one"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"alpn": [
|
||||
"h2",
|
||||
"h3"
|
||||
],
|
||||
"fingerprint": "firefox"
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 255
|
||||
}
|
||||
}
|
||||
},
|
||||
{% endfor %}
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom",
|
||||
"settings": {
|
||||
"domainStrategy": "UseIPv4"
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 255,
|
||||
"interface": "eth1",
|
||||
"tcpFastOpen": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "blocked",
|
||||
"protocol": "blackhole",
|
||||
"settings": {
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
{% if xray_outbounds | length > 1 %}
|
||||
"balancers": [
|
||||
{
|
||||
"tag": "balancer-vless",
|
||||
"selector": ["vless-"],
|
||||
"strategy": {
|
||||
"type": "leastLoad",
|
||||
"settings": {
|
||||
"costs": [
|
||||
{% for item in xray_outbounds %}
|
||||
{
|
||||
"match": "vless-{{ item.tag }}",
|
||||
"value": {{ item.value }}
|
||||
}{{ "," if not loop.last else "" }}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
{% endif %}
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"protocol": ["bittorrent"],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"tproxy",
|
||||
"socks-in"
|
||||
],
|
||||
"balancerTag": "{{ 'balancer-vless' if xray_outbounds | length > 1 else 'vless-' ~ xray_outbounds[0].tag }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user