From 2488adc042e8b83b626b3d90355eba3430179972 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 17 Jan 2024 16:32:25 +0330 Subject: [PATCH] remove old files, codes, info --- README.md | 47 +++----- .../traffic+block-ads+ipv4-google.json | 97 ---------------- media/configs/traffic+block-ads+warp.json | 105 ------------------ media/configs/traffic+block-iran-domains.json | 84 -------------- media/configs/traffic+block-iran-ip.json | 76 ------------- media/configs/traffic.json | 65 ----------- web/html/xui/xray.html | 20 ---- 7 files changed, 18 insertions(+), 476 deletions(-) delete mode 100644 media/configs/traffic+block-ads+ipv4-google.json delete mode 100644 media/configs/traffic+block-ads+warp.json delete mode 100644 media/configs/traffic+block-iran-domains.json delete mode 100644 media/configs/traffic+block-iran-ip.json delete mode 100644 media/configs/traffic.json diff --git a/README.md b/README.md index 96952794..d9da9cf5 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,15 @@ systemctl restart x-ui ghcr.io/mhsanaei/3x-ui:latest ``` +update to latest version + + ```sh + cd 3x-ui + docker compose down + docker compose pull 3x-ui + docker compose up -d + ``` + @@ -196,26 +205,6 @@ certbot renew --dry-run - -## Xray Configurations - -
- Click for Xray configurations details - -#### Usage - -**1.** Copy & paste into the Advanced Xray Configuration: - -- [traffic](./media/configs/traffic.json) -- [traffic + Block all Iran IP address](./media/configs/traffic+block-iran-ip.json) -- [traffic + Block all Iran Domains](./media/configs/traffic+block-iran-domains.json) -- [traffic + Block Ads + Use IPv4 for Google](./media/configs/traffic+block-ads+ipv4-google.json) -- [traffic + Block Ads + Route Google + Netflix + Spotify + OpenAI (ChatGPT) to WARP](./media/configs/traffic+block-ads+warp.json) - -***Tip:*** *You don't need to do this for a fresh install.* - -
- ## [WARP Configuration](https://gitlab.com/fscarmen/warp)
@@ -223,21 +212,21 @@ certbot renew --dry-run #### Usage -If you want to use routing to WARP follow steps as below: +If you want to use routing to WARP before v2.1.0 follow steps as below: -**1.** If you already installed warp, you can uninstall using below command: - - ```sh - warp u - ``` - -**2.** Install WARP on **SOCKS Proxy Mode**: +**1.** Install WARP on **SOCKS Proxy Mode**: ```sh bash <(curl -sSL https://raw.githubusercontent.com/hamid-gh98/x-ui-scripts/main/install_warp_proxy.sh) ``` -**3.** Turn on the config you need in panel or [Copy and paste this file to Xray Configuration](./media/configs/traffic+block-ads+warp.json) +**2.** If you already installed warp, you can uninstall using below command: + + ```sh + warp u + ``` + +**3.** Turn on the config you need in panel Config Features: diff --git a/media/configs/traffic+block-ads+ipv4-google.json b/media/configs/traffic+block-ads+ipv4-google.json deleted file mode 100644 index d6cf9171..00000000 --- a/media/configs/traffic+block-ads+ipv4-google.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "log": { - "loglevel": "warning", - "error": "./error.log" - }, - "api": { - "tag": "api", - "services": [ - "HandlerService", - "LoggerService", - "StatsService" - ] - }, - "inbounds": [ - { - "tag": "api", - "listen": "127.0.0.1", - "port": 62789, - "protocol": "dokodemo-door", - "settings": { - "address": "127.0.0.1" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - }, - { - "tag": "blocked", - "protocol": "blackhole", - "settings": {} - }, - { - "tag": "IPv4", - "protocol": "freedom", - "settings": { - "domainStrategy": "UseIPv4" - } - } - ], - "policy": { - "levels": { - "0": { - "statsUserDownlink": true, - "statsUserUplink": true - } - }, - "system": { - "statsInboundDownlink": true, - "statsInboundUplink": true - } - }, - "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": "blocked", - "domain": [ - "geosite:category-ads-all", - "ext:geosite_IR.dat:category-ads-all" - ] - }, - { - "type": "field", - "outboundTag": "IPv4", - "domain": [ - "geosite:google" - ] - } - ] - }, - "stats": {} -} \ No newline at end of file diff --git a/media/configs/traffic+block-ads+warp.json b/media/configs/traffic+block-ads+warp.json deleted file mode 100644 index c85cd2e9..00000000 --- a/media/configs/traffic+block-ads+warp.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "log": { - "loglevel": "warning", - "error": "./error.log" - }, - "api": { - "tag": "api", - "services": [ - "HandlerService", - "LoggerService", - "StatsService" - ] - }, - "inbounds": [ - { - "tag": "api", - "listen": "127.0.0.1", - "port": 62789, - "protocol": "dokodemo-door", - "settings": { - "address": "127.0.0.1" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - }, - { - "tag": "blocked", - "protocol": "blackhole", - "settings": {} - }, - { - "tag": "WARP", - "protocol": "socks", - "settings": { - "servers": [ - { - "address": "127.0.0.1", - "port": 40000 - } - ] - } - } - ], - "policy": { - "levels": { - "0": { - "statsUserDownlink": true, - "statsUserUplink": true - } - }, - "system": { - "statsInboundDownlink": true, - "statsInboundUplink": true - } - }, - "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": "blocked", - "domain": [ - "geosite:category-ads-all", - "ext:geosite_IR.dat:category-ads-all" - ] - }, - { - "type": "field", - "outboundTag": "WARP", - "domain": [ - "geosite:spotify", - "geosite:netflix", - "geosite:openai", - "geosite:google" - ] - } - ] - }, - "stats": {} -} \ No newline at end of file diff --git a/media/configs/traffic+block-iran-domains.json b/media/configs/traffic+block-iran-domains.json deleted file mode 100644 index 96de15fd..00000000 --- a/media/configs/traffic+block-iran-domains.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "log": { - "loglevel": "warning", - "error": "./error.log" - }, - "api": { - "tag": "api", - "services": [ - "HandlerService", - "LoggerService", - "StatsService" - ] - }, - "inbounds": [ - { - "tag": "api", - "listen": "127.0.0.1", - "port": 62789, - "protocol": "dokodemo-door", - "settings": { - "address": "127.0.0.1" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - }, - { - "tag": "blocked", - "protocol": "blackhole", - "settings": {} - } - ], - "policy": { - "levels": { - "0": { - "statsUserDownlink": true, - "statsUserUplink": true - } - }, - "system": { - "statsInboundDownlink": true, - "statsInboundUplink": true - } - }, - "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": "blocked", - "domain": [ - "regexp:.*\\.ir$", - "regexp:.*\\.xn--mgba3a4f16a$", - "ext:geosite_IR.dat:ir" - ] - } - ] - }, - "stats": {} -} \ No newline at end of file diff --git a/media/configs/traffic+block-iran-ip.json b/media/configs/traffic+block-iran-ip.json deleted file mode 100644 index 5e7d3f29..00000000 --- a/media/configs/traffic+block-iran-ip.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "log": { - "loglevel": "warning", - "error": "./error.log" - }, - "api": { - "tag": "api", - "services": [ - "HandlerService", - "LoggerService", - "StatsService" - ] - }, - "inbounds": [ - { - "tag": "api", - "listen": "127.0.0.1", - "port": 62789, - "protocol": "dokodemo-door", - "settings": { - "address": "127.0.0.1" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - }, - { - "tag": "blocked", - "protocol": "blackhole", - "settings": {} - } - ], - "policy": { - "levels": { - "0": { - "statsUserDownlink": true, - "statsUserUplink": true - } - }, - "system": { - "statsInboundDownlink": true, - "statsInboundUplink": true - } - }, - "routing": { - "domainStrategy": "IPIfNonMatch", - "rules": [ - { - "type": "field", - "inboundTag": [ - "api" - ], - "outboundTag": "api" - }, - { - "type": "field", - "outboundTag": "blocked", - "ip": [ - "geoip:private", - "ext:geoip_IR.dat:ir" - ] - }, - { - "type": "field", - "outboundTag": "blocked", - "protocol": [ - "bittorrent" - ] - } - ] - }, - "stats": {} -} \ No newline at end of file diff --git a/media/configs/traffic.json b/media/configs/traffic.json deleted file mode 100644 index 63c3537e..00000000 --- a/media/configs/traffic.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "log": { - "loglevel": "warning", - "error": "./error.log" - }, - "api": { - "tag": "api", - "services": ["HandlerService", "LoggerService", "StatsService"] - }, - "inbounds": [ - { - "tag": "api", - "listen": "127.0.0.1", - "port": 62789, - "protocol": "dokodemo-door", - "settings": { - "address": "127.0.0.1" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - }, - { - "tag": "blocked", - "protocol": "blackhole", - "settings": {} - } - ], - "policy": { - "levels": { - "0": { - "statsUserDownlink": true, - "statsUserUplink": true - } - }, - "system": { - "statsInboundDownlink": true, - "statsInboundUplink": true - } - }, - "routing": { - "domainStrategy": "IPIfNonMatch", - "rules": [ - { - "type": "field", - "inboundTag": ["api"], - "outboundTag": "api" - }, - { - "type": "field", - "outboundTag": "blocked", - "ip": ["geoip:private"] - }, - { - "type": "field", - "outboundTag": "blocked", - "protocol": ["bittorrent"] - } - ] - }, - "stats": {} -} diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 54d40993..05f5f178 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -1122,26 +1122,6 @@ this.templateRuleSetter({ outboundTag: "warp", property: "domain", data: newValue }); } }, - manualBlockedIPs: { - get: function () { return JSON.stringify(this.blockedIPs, null, 2); }, - set: debounce(function (value) { this.blockedIPs = JSON.parse(value); }, 1000) - }, - manualBlockedDomains: { - get: function () { return JSON.stringify(this.blockedDomains, null, 2); }, - set: debounce(function (value) { this.blockedDomains = JSON.parse(value); }, 1000) - }, - manualDirectIPs: { - get: function () { return JSON.stringify(this.directIPs, null, 2); }, - set: debounce(function (value) { this.directIPs = JSON.parse(value); }, 1000) - }, - manualDirectDomains: { - get: function () { return JSON.stringify(this.directDomains, null, 2); }, - set: debounce(function (value) { this.directDomains = JSON.parse(value); }, 1000) - }, - manualIPv4Domains: { - get: function () { return JSON.stringify(this.ipv4Domains, null, 2); }, - set: debounce(function (value) { this.ipv4Domains = JSON.parse(value); }, 1000) - }, torrentSettings: { get: function () { return doAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols);