From d2751939db7aa6549ea4e1a5503b375d5347aaea Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Sat, 19 Jul 2025 00:12:54 +1000 Subject: [PATCH] Built-in support for Iranian geosite/geoip --- Dockerfile | 2 ++ README.md | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f16806e..88d4106 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN git clone https://github.com/XTLS/Xray-core.git . && \ RUN curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat RUN curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat +RUN curl -sSLO https://github.com/bootmortis/iran-hosted-domains/releases/download/202507140045/iran.dat RUN curl -sSLO https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf RUN curl -sSLO https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf @@ -23,6 +24,7 @@ FROM alpine:3.20 COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/ COPY --from=builder /go/src/XTLS/Xray-core/geosite.dat /usr/local/bin/ COPY --from=builder /go/src/XTLS/Xray-core/geoip.dat /usr/local/bin/ +COPY --from=builder /go/src/XTLS/Xray-core/iran.dat /usr/local/bin/ RUN mkdir -p /etc/dnsmasq.disable diff --git a/README.md b/README.md index 6e1330b..fe70a79 100644 --- a/README.md +++ b/README.md @@ -160,12 +160,20 @@ $ docker run --rm -it -p 1080:1080 samuelhbne/proxy-xray \ The following instruction connect to Xray server port 443 in TCP-Trojan-TLS mode with given password; Update geosite and geoip rule dat files; All sites and IPs located in Iran will be connected directly. All Iran-related domains that are blocked inside of iran will be proxied. +```shell +$ docker run --rm -it -p 1080:1080 samuelhbne/proxy-xray \ +--ttt trojan_pass@mydomain.duckdns.org:8443 \ +--domain-direct ext:iran.dat:ir --ip-direct geoip:ir --domain-proxy ext:iran.dat:proxy +``` + +#### In case you need to run proxy-xray with updated geosite/geoip dat files. + ```shell $ mkdir -p /tmp/rules $ cd /tmp/rules $ wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat $ wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -$ wget -c -t3 -T30 https://github.com/SamadiPour/iran-hosted-domains/releases/download/202409300035/iran.dat +$ wget -c -t3 -T30 https://github.com/SamadiPour/iran-hosted-domains/releases/download/202507140045/iran.dat $ docker run --rm -it -p 1080:1080 -v /tmp/rules:/opt/rules samuelhbne/proxy-xray \ --ttt trojan_pass@mydomain.duckdns.org:8443 \ --rules-path /opt/rules --domain-direct ext:iran.dat:ir --ip-direct geoip:ir --domain-proxy ext:iran.dat:proxy