revert: roll back home squad and BirdSocks changes to 028deea
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 3s
ansible-deploy / deploy (core-net, ) (push) Successful in 20s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 31s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m24s
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 3s
ansible-deploy / deploy (core-net, ) (push) Successful in 20s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 31s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m24s
This commit is contained in:
1 parent
94216f181e
commit
6b302b9754
10 files changed
+68
-430
No files matched your search
@@ -6,8 +6,6 @@ remnanode_allow_panel_wan: true
|
||||
remnanode_selfsteal_domain: "lulu.gunihome.ru"
|
||||
remnanode_cloudflare_zone: "gunihome.ru"
|
||||
remnanode_xhttp_path: "/xhttp-lulu"
|
||||
remnanode_extra_ports:
|
||||
- 8443
|
||||
remnanode_panel_egress_ips:
|
||||
- "213.128.28.107" # провайдер 1 (МТС)
|
||||
- "185.160.137.140" # провайдер 2 (NorCom)
|
||||
@@ -28,16 +28,7 @@ nodes:
|
||||
profile_name: "RU-Cascade"
|
||||
profile_template: "profile-cascade-ru.json"
|
||||
inbound_tag: "Steal-Lulu"
|
||||
extra_inbound_tags:
|
||||
- "Steal-Lulu-Home"
|
||||
selfsteal_domain: "lulu.gunihome.ru"
|
||||
xhttp_path: "/xhttp-lulu"
|
||||
host_remark: "🇷🇺→🇩🇪 lulu"
|
||||
home_host:
|
||||
squad_name: "home"
|
||||
inbound_tag: "Steal-Lulu-Home"
|
||||
port: 8443
|
||||
xhttp_path: "/xhttp-lulu-home"
|
||||
remark: "📱 🇷🇺→🇩🇪 lulu + NetBird"
|
||||
xray_template_name: "Except-RU-BirdSocks"
|
||||
|
||||
@@ -43,38 +43,6 @@
|
||||
"serverNames": ["__SELFSTEAL_DOMAIN__"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "Steal-Lulu-Home",
|
||||
"listen": "31.177.108.210",
|
||||
"port": 8443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [],
|
||||
"decryption": "none"
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": ["http", "tls", "quic"]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "xhttp",
|
||||
"security": "reality",
|
||||
"xhttpSettings": {
|
||||
"host": "__SELFSTEAL_DOMAIN__",
|
||||
"mode": "stream-one",
|
||||
"path": "/xhttp-lulu-home"
|
||||
},
|
||||
"realitySettings": {
|
||||
"dest": "/dev/shm/nginx.sock",
|
||||
"show": false,
|
||||
"xver": 1,
|
||||
"spiderX": "",
|
||||
"shortIds": ["__REALITY_SHORT_ID__"],
|
||||
"privateKey": "__REALITY_PRIVATE_KEY__",
|
||||
"serverNames": ["__SELFSTEAL_DOMAIN__"]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
@@ -89,7 +57,8 @@
|
||||
"users": [
|
||||
{
|
||||
"id": "__CASCADE_UUID__",
|
||||
"encryption": "none"
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -219,52 +219,11 @@ def ensure_cascade_credentials(
|
||||
if ru_prof:
|
||||
_, ru_full = api.request("GET", f"/config-profiles/{ru_prof['uuid']}")
|
||||
ru_cfg = (ru_full.get("response") or ru_full).get("config") or {}
|
||||
ru_inbounds = ru_cfg.get("inbounds") or []
|
||||
ru_has_home = any(i.get("tag") == "Steal-Lulu-Home" for i in ru_inbounds)
|
||||
if not ru_has_home:
|
||||
steal_lulu = next((i for i in ru_inbounds if i.get("tag") == "Steal-Lulu"), {})
|
||||
rs_lulu = (steal_lulu.get("streamSettings") or {}).get("realitySettings") or {}
|
||||
home_inbound = {
|
||||
"tag": "Steal-Lulu-Home",
|
||||
"listen": "31.177.108.210",
|
||||
"port": 8443,
|
||||
"protocol": "vless",
|
||||
"settings": {"clients": [], "decryption": "none"},
|
||||
"sniffing": {"enabled": True, "destOverride": ["http", "tls", "quic"]},
|
||||
"streamSettings": {
|
||||
"network": "xhttp",
|
||||
"security": "reality",
|
||||
"xhttpSettings": {
|
||||
"host": "lulu.gunihome.ru",
|
||||
"mode": "stream-one",
|
||||
"path": "/xhttp-lulu-home",
|
||||
},
|
||||
"realitySettings": {
|
||||
"dest": "/dev/shm/nginx.sock",
|
||||
"show": False,
|
||||
"xver": 1,
|
||||
"spiderX": "",
|
||||
"shortIds": rs_lulu.get("shortIds") or [secrets.token_hex(8)],
|
||||
"privateKey": rs_lulu.get("privateKey") or generate_x25519(api)[0],
|
||||
"serverNames": ["lulu.gunihome.ru"],
|
||||
},
|
||||
},
|
||||
}
|
||||
ru_cfg["inbounds"] = ru_inbounds + [home_inbound]
|
||||
api.request("PATCH", "/config-profiles/", {"uuid": ru_prof["uuid"], "config": ru_cfg})
|
||||
changes.append("added Steal-Lulu-Home inbound to RU-Cascade")
|
||||
|
||||
for ob in ru_cfg.get("outbounds") or []:
|
||||
if ob.get("tag") == "CASCADE-DE":
|
||||
vnext = (ob.get("settings") or {}).get("vnext") or []
|
||||
rs = (ob.get("streamSettings") or {}).get("realitySettings") or {}
|
||||
users = (vnext[0].get("users") or [{}]) if vnext else [{}]
|
||||
if (
|
||||
vnext
|
||||
and vnext[0].get("port") == 443
|
||||
and rs.get("serverName") == "yali.gunis.top"
|
||||
and not users[0].get("flow")
|
||||
):
|
||||
if vnext and vnext[0].get("port") == 443 and rs.get("serverName") == "yali.gunis.top":
|
||||
ru_ok = True
|
||||
|
||||
if has_cascade_inb and not has_steal_yali and ru_ok:
|
||||
@@ -288,7 +247,7 @@ def ensure_cascade_credentials(
|
||||
"port": 443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [{"id": creds["uuid"]}],
|
||||
"clients": [{"id": creds["uuid"], "flow": "xtls-rprx-vision"}],
|
||||
"decryption": "none",
|
||||
},
|
||||
"sniffing": {
|
||||
@@ -326,7 +285,6 @@ def ensure_cascade_credentials(
|
||||
if vnext:
|
||||
vnext[0]["port"] = 443
|
||||
vnext[0]["users"][0]["id"] = creds["uuid"]
|
||||
vnext[0]["users"][0].pop("flow", None)
|
||||
rs = (ob.get("streamSettings") or {}).get("realitySettings") or {}
|
||||
rs["serverName"] = "yali.gunis.top"
|
||||
rs["publicKey"] = creds["pub"]
|
||||
@@ -395,72 +353,7 @@ def ensure_profile_and_inbound(
|
||||
for i in inbounds
|
||||
if i.get("tag") == tag
|
||||
]
|
||||
return profile_uuid, inbound_uuid, extra_uuids, inbounds
|
||||
|
||||
|
||||
def _upsert_host(
|
||||
api: RemnawaveAPI,
|
||||
address: str,
|
||||
port: int,
|
||||
path: str,
|
||||
remark: str,
|
||||
profile_uuid: str,
|
||||
inbound_uuid: str,
|
||||
node_uuid: str,
|
||||
tpl_uuid: str,
|
||||
changes: list[str],
|
||||
) -> None:
|
||||
_, hosts_resp = api.request("GET", "/hosts/")
|
||||
hosts = _extract_list(hosts_resp)
|
||||
existing_host = next(
|
||||
(h for h in hosts if h.get("address") == address and int(h.get("port") or 0) == port),
|
||||
None,
|
||||
)
|
||||
|
||||
if not existing_host:
|
||||
host_payload = {
|
||||
"remark": remark,
|
||||
"address": address,
|
||||
"port": port,
|
||||
"path": path,
|
||||
"sni": address,
|
||||
"host": address,
|
||||
"fingerprint": "chrome",
|
||||
"isDisabled": False,
|
||||
"securityLayer": "DEFAULT",
|
||||
"alpn": "h2",
|
||||
"xHttpExtraParams": {
|
||||
"xmux": {
|
||||
"maxConcurrency": "16-32",
|
||||
"hMaxRequestTimes": "600-900",
|
||||
"hMaxReusableSecs": "1800-3000",
|
||||
},
|
||||
"noSSEHeader": True,
|
||||
"xPaddingBytes": "100-1000",
|
||||
},
|
||||
"inbound": {
|
||||
"configProfileUuid": profile_uuid,
|
||||
"configProfileInboundUuid": inbound_uuid,
|
||||
},
|
||||
"nodes": [node_uuid],
|
||||
}
|
||||
if tpl_uuid:
|
||||
host_payload["xrayJsonTemplateUuid"] = tpl_uuid
|
||||
_, created = api.request("POST", "/hosts/", host_payload)
|
||||
host_uuid = (created.get("response") or created).get("uuid", "")
|
||||
if not host_uuid:
|
||||
raise RuntimeError(f"Не удалось создать host {address}:{port}")
|
||||
changes.append(f"created host {address}:{port}")
|
||||
else:
|
||||
host_uuid = existing_host["uuid"]
|
||||
patch_fields: dict[str, Any] = {"uuid": host_uuid}
|
||||
if existing_host.get("remark") != remark:
|
||||
patch_fields["remark"] = remark
|
||||
if tpl_uuid and existing_host.get("xrayJsonTemplateUuid") != tpl_uuid:
|
||||
patch_fields["xrayJsonTemplateUuid"] = tpl_uuid
|
||||
if len(patch_fields) > 1:
|
||||
api.request("PATCH", "/hosts/", patch_fields)
|
||||
changes.append(f"updated host {address}:{port}")
|
||||
return profile_uuid, inbound_uuid, extra_uuids
|
||||
|
||||
|
||||
def sync_node_and_host(
|
||||
@@ -474,7 +367,7 @@ def sync_node_and_host(
|
||||
netbird_connected: bool,
|
||||
changes: list[str],
|
||||
warnings: list[str],
|
||||
) -> str:
|
||||
) -> None:
|
||||
node_name = node_cfg["name"]
|
||||
target_addr = node_cfg["address"]
|
||||
nb_host = node_cfg.get("netbird_hostname", "")
|
||||
@@ -537,21 +430,57 @@ def sync_node_and_host(
|
||||
changes.append(f"updated node {node_name} ({target_addr})")
|
||||
|
||||
if not node_cfg.get("create_host", True):
|
||||
return node_uuid
|
||||
return
|
||||
|
||||
_upsert_host(
|
||||
api,
|
||||
node_cfg["selfsteal_domain"],
|
||||
443,
|
||||
node_cfg["xhttp_path"],
|
||||
node_cfg["host_remark"],
|
||||
profile_uuid,
|
||||
inbound_uuid,
|
||||
node_uuid,
|
||||
tpl_uuid,
|
||||
changes,
|
||||
)
|
||||
return node_uuid
|
||||
selfsteal = node_cfg["selfsteal_domain"]
|
||||
_, hosts_resp = api.request("GET", "/hosts/")
|
||||
hosts = _extract_list(hosts_resp)
|
||||
existing_host = next((h for h in hosts if h.get("address") == selfsteal), None)
|
||||
|
||||
if not existing_host:
|
||||
host_payload = {
|
||||
"remark": node_cfg["host_remark"],
|
||||
"address": selfsteal,
|
||||
"port": 443,
|
||||
"path": node_cfg["xhttp_path"],
|
||||
"sni": selfsteal,
|
||||
"host": selfsteal,
|
||||
"fingerprint": "chrome",
|
||||
"isDisabled": False,
|
||||
"securityLayer": "DEFAULT",
|
||||
"alpn": "h2",
|
||||
"xHttpExtraParams": {
|
||||
"xmux": {
|
||||
"maxConcurrency": "16-32",
|
||||
"hMaxRequestTimes": "600-900",
|
||||
"hMaxReusableSecs": "1800-3000",
|
||||
},
|
||||
"noSSEHeader": True,
|
||||
"xPaddingBytes": "100-1000",
|
||||
},
|
||||
"inbound": {
|
||||
"configProfileUuid": profile_uuid,
|
||||
"configProfileInboundUuid": inbound_uuid,
|
||||
},
|
||||
"nodes": [node_uuid],
|
||||
}
|
||||
if tpl_uuid:
|
||||
host_payload["xrayJsonTemplateUuid"] = tpl_uuid
|
||||
_, created = api.request("POST", "/hosts/", host_payload)
|
||||
host_uuid = (created.get("response") or created).get("uuid", "")
|
||||
if not host_uuid:
|
||||
raise RuntimeError(f"Не удалось создать host {selfsteal}")
|
||||
changes.append(f"created host {selfsteal}")
|
||||
else:
|
||||
host_uuid = existing_host["uuid"]
|
||||
patch_fields: dict[str, Any] = {"uuid": host_uuid}
|
||||
if existing_host.get("remark") != node_cfg["host_remark"]:
|
||||
patch_fields["remark"] = node_cfg["host_remark"]
|
||||
if tpl_uuid and existing_host.get("xrayJsonTemplateUuid") != tpl_uuid:
|
||||
patch_fields["xrayJsonTemplateUuid"] = tpl_uuid
|
||||
if len(patch_fields) > 1:
|
||||
api.request("PATCH", "/hosts/", patch_fields)
|
||||
changes.append(f"updated host {selfsteal}")
|
||||
|
||||
|
||||
def sync_squad(
|
||||
@@ -564,20 +493,10 @@ def sync_squad(
|
||||
squads = _extract_list(squads_resp, "internalSquads")
|
||||
squad_map = {s["name"]: s["uuid"] for s in squads if s.get("name") and s.get("uuid")}
|
||||
|
||||
desired_inbounds = list(dict.fromkeys(inbound_uuids))
|
||||
target = next((s for s in squads if s.get("name") == squad_name), None)
|
||||
if not target:
|
||||
_, created = api.request(
|
||||
"POST",
|
||||
"/internal-squads/",
|
||||
{"name": squad_name, "inbounds": desired_inbounds},
|
||||
)
|
||||
new_uuid = (created.get("response") or created).get("uuid", "")
|
||||
if new_uuid:
|
||||
squad_map[squad_name] = new_uuid
|
||||
changes.append(f"created squad {squad_name}")
|
||||
else:
|
||||
if target:
|
||||
cur_inbounds = [i["uuid"] for i in (target.get("inbounds") or []) if i.get("uuid")]
|
||||
desired_inbounds = list(dict.fromkeys(inbound_uuids))
|
||||
if set(cur_inbounds) != set(desired_inbounds):
|
||||
api.request(
|
||||
"PATCH",
|
||||
@@ -788,33 +707,17 @@ def main() -> int:
|
||||
cfg["xray_template_json"],
|
||||
changes,
|
||||
)
|
||||
tpl_map = {cfg["xray_template"]["name"]: tpl_uuid}
|
||||
for extra_tpl in cfg.get("extra_xray_templates", []):
|
||||
tpl_map[extra_tpl["name"]] = sync_xray_template(
|
||||
api,
|
||||
extra_tpl["name"],
|
||||
extra_tpl["json"],
|
||||
changes,
|
||||
)
|
||||
|
||||
cascade_creds = ensure_cascade_credentials(api, changes)
|
||||
|
||||
inbound_uuids: list[str] = []
|
||||
home_squad_inbounds: dict[str, list[str]] = {}
|
||||
for node_cfg in cfg.get("nodes", []):
|
||||
profile_uuid, inbound_uuid, extra_inbound_uuids, all_inbounds = ensure_profile_and_inbound(
|
||||
profile_uuid, inbound_uuid, extra_inbound_uuids = ensure_profile_and_inbound(
|
||||
api, node_cfg, cfg.get("profile_templates", {}), cascade_creds, changes
|
||||
)
|
||||
home_cfg = node_cfg.get("home_host")
|
||||
home_tag = home_cfg.get("inbound_tag") if home_cfg else None
|
||||
home_inb_uuid = next((i["uuid"] for i in all_inbounds if i.get("tag") == home_tag), "") if home_tag else ""
|
||||
|
||||
inbound_uuids.append(inbound_uuid)
|
||||
for eu in extra_inbound_uuids:
|
||||
if eu != home_inb_uuid:
|
||||
inbound_uuids.append(eu)
|
||||
|
||||
node_uuid = sync_node_and_host(
|
||||
inbound_uuids.extend(extra_inbound_uuids)
|
||||
sync_node_and_host(
|
||||
api,
|
||||
node_cfg,
|
||||
profile_uuid,
|
||||
@@ -826,25 +729,8 @@ def main() -> int:
|
||||
changes,
|
||||
warnings,
|
||||
)
|
||||
if home_cfg and home_inb_uuid:
|
||||
sq = home_cfg["squad_name"]
|
||||
home_squad_inbounds.setdefault(sq, []).append(home_inb_uuid)
|
||||
_upsert_host(
|
||||
api,
|
||||
node_cfg["selfsteal_domain"],
|
||||
int(home_cfg["port"]),
|
||||
home_cfg["xhttp_path"],
|
||||
home_cfg["remark"],
|
||||
profile_uuid,
|
||||
home_inb_uuid,
|
||||
node_uuid,
|
||||
tpl_map.get(home_cfg["xray_template_name"], ""),
|
||||
changes,
|
||||
)
|
||||
|
||||
squad_map = sync_squad(api, cfg.get("squad_name", "Default-Squad"), inbound_uuids, changes)
|
||||
for sq_name, sq_inbs in home_squad_inbounds.items():
|
||||
squad_map.update(sync_squad(api, sq_name, sq_inbs, changes))
|
||||
cleanup_removed_nodes_and_hosts(api, cfg.get("nodes", []), changes)
|
||||
sync_subscription_settings(api, cfg.get("subscription_page_config", "Homelab"), changes)
|
||||
xray_url = sync_users(
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
{
|
||||
"remnawave": {
|
||||
"addVirtualHostAsOutbound": true
|
||||
},
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"full:lulu.gunihome.ru",
|
||||
"full:central.gunihome.ru"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": ["domain:gunihome.ru"],
|
||||
"outboundTag": "netbird-socks"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"192.168.1.0/24",
|
||||
"100.68.0.0/16"
|
||||
],
|
||||
"outboundTag": "netbird-socks"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"regexp:^([a-z0-9-]+\\.)*2ip\\.[a-z0-9.-]+$",
|
||||
"domain:ifconfig.me",
|
||||
"domain:www.ifconfig.me",
|
||||
"domain:ifconfig.co",
|
||||
"domain:www.ifconfig.co",
|
||||
"domain:ifconfig.io",
|
||||
"domain:www.ifconfig.io",
|
||||
"domain:ifconfig.so",
|
||||
"domain:checkip.amazonaws.com",
|
||||
"domain:api.ipify.org",
|
||||
"domain:ipify.org",
|
||||
"domain:ip.sb",
|
||||
"domain:www.ip.sb",
|
||||
"domain:api-ipv4.ip.sb",
|
||||
"domain:api.ipv6.ip.sb",
|
||||
"domain:ip-api.com",
|
||||
"domain:api.ipapi.is",
|
||||
"domain:ipapi.co",
|
||||
"domain:ipapi.com",
|
||||
"domain:iplocation.net",
|
||||
"domain:iplocation.io",
|
||||
"domain:iplocation.com",
|
||||
"domain:ipwho.is",
|
||||
"domain:ipwhois.io",
|
||||
"domain:ipinfo.io",
|
||||
"domain:www.ipinfo.io",
|
||||
"domain:ident.me",
|
||||
"domain:myip.com",
|
||||
"domain:whatismyipaddress.com",
|
||||
"domain:wtfismyip.com",
|
||||
"domain:whatismyip.com",
|
||||
"domain:showmyip.com",
|
||||
"domain:icanhazip.com",
|
||||
"domain:geojs.io",
|
||||
"domain:ipleak.net",
|
||||
"domain:ipleak.org",
|
||||
"domain:browserleaks.com",
|
||||
"domain:dnsleaktest.com",
|
||||
"domain:dnscheck.tools",
|
||||
"domain:whoer.net",
|
||||
"domain:hidemy.name",
|
||||
"domain:sypexgeo.net",
|
||||
"domain:api.sypexgeo.net",
|
||||
"domain:mail.ru",
|
||||
"domain:ip.mail.ru",
|
||||
"full:ipv4-internet.yandex.net",
|
||||
"full:ipv6-internet.yandex.net",
|
||||
"full:www.cloudflare.com/cdn-cgi/trace"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"domain:habr.com",
|
||||
"domain:4pda.to",
|
||||
"domain:4pda.ru",
|
||||
"domain:kemono.su",
|
||||
"domain:jut.su",
|
||||
"domain:kara.su",
|
||||
"domain:theins.ru",
|
||||
"domain:tvrain.ru",
|
||||
"domain:echo.msk.ru",
|
||||
"domain:the-village.ru",
|
||||
"domain:snob.ru",
|
||||
"domain:novayagazeta.ru",
|
||||
"domain:moscowtimes.ru",
|
||||
"domain:allnorilsk.ru"
|
||||
],
|
||||
"outboundTag": "proxy"
|
||||
},
|
||||
{
|
||||
"ip": ["geoip:ru"],
|
||||
"type": "field",
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": ["geosite:category-ru"],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"ip": ["geoip:private"],
|
||||
"type": "field",
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"protocol": ["bittorrent"],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"network": "tcp,udp",
|
||||
"outboundTag": "proxy"
|
||||
}
|
||||
],
|
||||
"domainMatcher": "hybrid",
|
||||
"domainStrategy": "IPIfNonMatch"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "socks",
|
||||
"port": 10808,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"udp": true,
|
||||
"auth": "noauth"
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"routeOnly": false,
|
||||
"destOverride": ["http", "tls", "quic"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "http",
|
||||
"port": 10809,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "http",
|
||||
"settings": {
|
||||
"allowTransparent": false
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"routeOnly": false,
|
||||
"destOverride": ["http", "tls", "quic"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom"
|
||||
},
|
||||
{
|
||||
"tag": "netbird-socks",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1055
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "block",
|
||||
"protocol": "blackhole"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20,9 +20,6 @@
|
||||
xray_checker_user: "{{ remnawave_xray_checker_user }}"
|
||||
xray_template: "{{ remnawave_nodes_cfg.xray_template }}"
|
||||
xray_template_json: "{{ lookup('file', role_path ~ '/files/' ~ remnawave_nodes_cfg.xray_template.file) | from_json }}"
|
||||
extra_xray_templates:
|
||||
- name: "Except-RU-BirdSocks"
|
||||
json: "{{ lookup('file', role_path ~ '/files/xray-except-ru-birdsocks.json') | from_json }}"
|
||||
squad_name: "{{ remnawave_nodes_cfg.squad_name | default('Default-Squad') }}"
|
||||
subscription_page_config: "{{ remnawave_nodes_cfg.subscription_page_config | default('Homelab') }}"
|
||||
nodes: "{{ remnawave_nodes_cfg.nodes | default([]) }}"
|
||||
|
||||
@@ -9,7 +9,6 @@ remnanode_allow_panel_wan: false
|
||||
remnanode_dns_record_type: "A"
|
||||
remnanode_ipv6_only: false
|
||||
remnanode_cascade_allowed_ips: []
|
||||
remnanode_extra_ports: []
|
||||
|
||||
remnanode_selfsteal_domain: "yali.gunis.top"
|
||||
remnanode_xhttp_path: "/xhttp-yali"
|
||||
|
||||
@@ -224,13 +224,6 @@
|
||||
failed_when: false
|
||||
when: remnanode_ipv6_only | bool
|
||||
|
||||
- name: Разрешить дополнительные порты клиентов (если заданы)
|
||||
ansible.builtin.command: "ufw allow {{ item }}/tcp"
|
||||
loop: "{{ remnanode_extra_ports }}"
|
||||
register: ufw_extra_ports
|
||||
changed_when: "'added' in (ufw_extra_ports.stdout | lower)"
|
||||
when: remnanode_extra_ports | length > 0
|
||||
|
||||
- name: Разрешить 443/tcp только с входных IPv6 каскада
|
||||
ansible.builtin.command: "ufw allow from {{ item }} to {{ remnanode_public_ip }} port 443 proto tcp"
|
||||
loop: "{{ remnanode_cascade_allowed_ips }}"
|
||||
|
||||
@@ -29,7 +29,13 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~ ^{{ remnanode_xhttp_path }}(?:-home)?/?$ {
|
||||
location = {{ remnanode_xhttp_path }} {
|
||||
default_type text/plain;
|
||||
add_header Cache-Control "no-store" always;
|
||||
return 200 "ok";
|
||||
}
|
||||
|
||||
location = {{ remnanode_xhttp_path }}/ {
|
||||
default_type text/plain;
|
||||
add_header Cache-Control "no-store" always;
|
||||
return 200 "ok";
|
||||
|
||||
@@ -9,7 +9,6 @@ client_groups:
|
||||
- exit-clients
|
||||
- remnawave
|
||||
- exit-ger-nod-02
|
||||
- homelab-routers
|
||||
|
||||
# Выходные шлюзы (Exit Nodes)
|
||||
exit_nodes:
|
||||
@@ -121,19 +120,3 @@ policies:
|
||||
- exit-clients
|
||||
destinations:
|
||||
- exit-ger-nod-02
|
||||
|
||||
- name: "exit-clients-to-homelab"
|
||||
description: "Allow BirdSocks/NetBird clients to reach homelab LAN (via OPNsense) and core-net"
|
||||
enabled: true
|
||||
rules:
|
||||
- name: "exit-clients-homelab-tcp-udp"
|
||||
description: "Allow TCP/UDP from exit-clients to homelab-routers and remnawave"
|
||||
enabled: true
|
||||
action: accept
|
||||
protocol: all
|
||||
bidirectional: false
|
||||
sources:
|
||||
- exit-clients
|
||||
destinations:
|
||||
- homelab-routers
|
||||
- remnawave
|
||||
Reference in new issue
Block a user