Skip to content

Commit

Permalink
Fastly blocked domain fronting
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgr0g committed Mar 11, 2024
1 parent f96de33 commit 6bf96cb
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN apk --no-cache add curl \
ARG RECONFIGURED=false
COPY setup /opt/

COPY --from=build-env-snowflake /builder/snowflake/client/client /opt/tor/client
COPY --from=build-env-snowflake /builder/snowflake/client/client /opt/tor/snowflake

EXPOSE 8888 9050 9051

Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# VERSIONS ---------------------------------------------------------------------
IMG_VER=0.1.4
IMG_VER=0.1.5
IMG_NAME=mcgr0g/talpa-altaica
BUILD_DATE:=$(shell date '+%Y-%m-%d')

GOLANG_VER=1.21.1 # need update https://forum.torproject.org/t/problems-with-snowflake-since-2023-09-20-broker-failure-unexpected-error-no-answer/9346/8
ALPINE_VER=3.18
SQUID_VER=5.9-r0
TOR_VER=0.4.8.7-r0
SNOWFLAKE_VER=v2.6.1
GOLANG_VER=1.22.1
ALPINE_VER=3.19.1
SQUID_VER=6.6-r0
TOR_VER=0.4.8.10-r0
SNOWFLAKE_VER=v2.9.1

# BUILD FLAGS -----------------------------------------------------------------

Expand Down Expand Up @@ -77,7 +77,7 @@ run:
$(IMG_NAME):$(IMG_VER)

container-flop:
docker container run -it $(IMG_NAME):$(IMG_VER) /bin/bash
docker container run -it $(IMG_NAME):$(IMG_VER) /bin/sh

runner-flop:
docker exec -it torproxy /bin/sh
12 changes: 12 additions & 0 deletions docs/build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ make build
if you want make several checks inside containter: `make runner-flop`

=== snowflake transport
DEPRECATED!
In country with strong censorship you need special transport for connection to tor net.

Transport building from source code.
Expand All @@ -38,6 +39,17 @@ only transport build
make snowflake
```

=== webtunel transport
based on https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel


only transport build
```
make webtunel
```

=== other

if you want make several checks inside image
```
docker images --filter "label=img_filter=torproxy" --format "{{.ID}}"
Expand Down
13 changes: 13 additions & 0 deletions setup/squid/upstream_proxies/torred_always.txt
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
torproject\.org
rutracker\.org
bt\.rutracker\.cc
bt2\.rutracker\.cc
bt3\.rutracker\.cc
bt4\.rutracker\.cc
bt\.t-ru\.org
bt2\.t-ru\.org
bt3\.t-ru\.org
bt4\.t-ru\.org
playhd\.cc
6tor\.org
rutor\.info
rutor7773fwscdatlqyc5sw3egsmwjkmklafljti5p7o236mveks3rid\.onion
11 changes: 11 additions & 0 deletions setup/tor/run
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ then
sed -i 's/# \(StrictNodes\)/\1/' $TORRC
fi

# USE OWN SNOWFLAKE BRIDGE --------------------------------------------------------------------------------------------
update_line="Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA"

if [ -n "${BRIDGE}" ]
then
sed -i "s^$special_line^Bridge $BRIDGE^g" "$TORRC"
echo "Updated $TORRC with bridge value: $BRIDGE"
else
echo "No bridge value provided. Skipping update."
fi

# NODE ROTATION -------------------------------------------------------------------------------------------------------

if [ !${1+NODE_ROTATION} ]
Expand Down
9 changes: 5 additions & 4 deletions setup/tor/torrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Log notice stdout
# snowflake tansport
UseBridges 1

# see https://forum.torproject.org/t/problems-with-snowflake-since-2023-09-20-broker-failure-unexpected-error-no-answer/9346
Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=foursquare.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=foursquare.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.net:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
# see https://forum.torproject.org/t/fix-problems-with-snowflake-since-2024-03-01-broker-failure-unexpected-error-no-answer/11755

ClientTransportPlugin snowflake exec ./client
Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://snowflake-broker.azureedge.net/ fronts=ajax.aspnetcdn.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA url=https://snowflake-broker.azureedge.net/ fronts=ajax.aspnetcdn.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.net:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn

ClientTransportPlugin snowflake exec ./snowflake

# Are the exit nodes restricted to specific location?
# ExitNodes {US}
Expand Down

0 comments on commit 6bf96cb

Please sign in to comment.