mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-16 20:27:06 +03:00
Built-in support for Iranian geosite/geoip
This commit is contained in:
@@ -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/geoip.dat
|
||||||
RUN curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.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/apple.china.conf
|
||||||
RUN curl -sSLO https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.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/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/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/geoip.dat /usr/local/bin/
|
||||||
|
COPY --from=builder /go/src/XTLS/Xray-core/iran.dat /usr/local/bin/
|
||||||
|
|
||||||
RUN mkdir -p /etc/dnsmasq.disable
|
RUN mkdir -p /etc/dnsmasq.disable
|
||||||
|
|
||||||
|
|||||||
10
README.md
10
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.
|
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
|
```shell
|
||||||
$ mkdir -p /tmp/rules
|
$ mkdir -p /tmp/rules
|
||||||
$ cd /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/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/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 \
|
$ docker run --rm -it -p 1080:1080 -v /tmp/rules:/opt/rules samuelhbne/proxy-xray \
|
||||||
--ttt trojan_pass@mydomain.duckdns.org:8443 \
|
--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
|
--rules-path /opt/rules --domain-direct ext:iran.dat:ir --ip-direct geoip:ir --domain-proxy ext:iran.dat:proxy
|
||||||
|
|||||||
Reference in New Issue
Block a user