Skip to content

Commit 59d8b71

Browse files
author
Delta-Kronecker
committed
Official tor 0.4.9.11 source + Windows portable build workflow
- pristine tor 0.4.9.11 from dist.torproject.org (same version as tor expert bundle) - configs/torrc.iran: proven tuning (no ConfluxEnabled / ExitNodes+StrictNodes, which stalled bootstrap at 45-50%); relative paths + geoip files - scripts: launcher.ps1 (start/stop/new circuit, sets system proxy), fetch-bridges.ps1 (optional bridge fallback when direct is blocked) - start.bat entry point - .github/workflows/build.yml: MSYS2 Windows build from official source + pluggable transports, packaged as a single portable artifact (tor-win64-portable)
0 parents  commit 59d8b71

1,468 files changed

Lines changed: 1322820 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Build Tor for Windows
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
transports:
13+
name: pluggable-transports (Windows x86_64)
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.24"
19+
20+
- name: Build pluggable transports
21+
run: |
22+
set -e
23+
mkdir -p out
24+
GOPATH_BIN="$(go env GOPATH)/bin/windows_amd64"
25+
26+
echo "=== obfs4 ==="
27+
GOOS=windows GOARCH=amd64 \
28+
go install gitlab.com/yawning/obfs4.git/obfs4proxy@latest
29+
cp "$GOPATH_BIN/obfs4proxy.exe" out/obfs4proxy.exe
30+
31+
echo "=== snowflake client ==="
32+
GOOS=windows GOARCH=amd64 \
33+
go install gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client@latest
34+
cp "$GOPATH_BIN/client.exe" out/snowflake-client.exe
35+
36+
echo "=== webtunnel client ==="
37+
GOOS=windows GOARCH=amd64 \
38+
go install gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/main/client@latest
39+
cp "$GOPATH_BIN/client.exe" out/webtunnel.exe
40+
41+
ls -la out/
42+
43+
- name: Upload artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: transports-win64
47+
path: out/
48+
49+
tor-win64:
50+
name: tor-win64-portable (single release artifact)
51+
runs-on: windows-latest
52+
needs: [transports]
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- uses: msys2/setup-msys2@v2
57+
with:
58+
msystem: MINGW64
59+
update: false
60+
install: >-
61+
mingw-w64-x86_64-gcc
62+
mingw-w64-x86_64-binutils
63+
make
64+
mingw-w64-x86_64-pkgconf
65+
mingw-w64-x86_64-libevent
66+
mingw-w64-x86_64-openssl
67+
mingw-w64-x86_64-zlib
68+
mingw-w64-x86_64-gettext
69+
perl
70+
autoconf
71+
automake
72+
libtool
73+
m4
74+
75+
- name: Configure
76+
shell: msys2 {0}
77+
run: |
78+
cd "$GITHUB_WORKSPACE"
79+
chmod +x configure
80+
./configure --host=x86_64-w64-mingw32 \
81+
--disable-asciidoc --disable-man --disable-html-docs
82+
83+
- name: Build
84+
shell: msys2 {0}
85+
run: |
86+
cd "$GITHUB_WORKSPACE"
87+
make -j$(nproc) 2>&1 | tee build-win.log
88+
exit ${PIPESTATUS[0]}
89+
90+
- name: Smoke test
91+
shell: msys2 {0}
92+
run: |
93+
cd "$GITHUB_WORKSPACE"
94+
./src/app/tor.exe --version
95+
96+
- name: Stage tor + runtime DLLs + geoip
97+
shell: msys2 {0}
98+
run: |
99+
cd "$GITHUB_WORKSPACE"
100+
mkdir -p dist/scripts dist/data
101+
cp src/app/tor.exe dist/
102+
cp "$MINGW_PREFIX"/bin/libevent*.dll "$MINGW_PREFIX"/bin/libssl-3-x64.dll "$MINGW_PREFIX"/bin/libcrypto-3-x64.dll "$MINGW_PREFIX"/bin/zlib1.dll dist/ 2>/dev/null || true
103+
cp src/config/geoip src/config/geoip6 dist/
104+
105+
- name: Download transports
106+
uses: actions/download-artifact@v4
107+
with:
108+
name: transports-win64
109+
path: transports/
110+
111+
- name: Merge transports into dist
112+
shell: pwsh
113+
run: |
114+
Copy-Item "transports\*.exe" -Destination "dist\" -Force
115+
Get-ChildItem "dist" | Select-Object Name, Length
116+
117+
- name: Copy portable config, scripts, README, start.bat
118+
shell: pwsh
119+
run: |
120+
Copy-Item "configs\torrc.iran" "dist\torrc" -Force
121+
Copy-Item "scripts\launcher.ps1" "dist\scripts\" -Force
122+
Copy-Item "scripts\fetch-bridges.ps1" "dist\scripts\" -Force
123+
if (Test-Path "README-iran.md") { Copy-Item "README-iran.md" "dist\" -Force }
124+
if (Test-Path "start.bat") { Copy-Item "start.bat" "dist\" -Force }
125+
126+
- name: Upload single release artifact
127+
uses: actions/upload-artifact@v4
128+
with:
129+
name: tor-win64-portable
130+
path: dist/
131+
132+
- name: Upload build log
133+
if: always()
134+
uses: actions/upload-artifact@v4
135+
with:
136+
name: build-log-win
137+
path: build-win.log

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# local build/test output
2+
/dist/
3+
/portable/
4+
/bin/
5+
*.log
6+
7+
# tor runtime data (kept next to the packaged tor.exe, never in the repo)
8+
data/

CODE_OF_CONDUCT

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The Tor Project is committed to fostering a inclusive community
2+
where people feel safe to engage, share their points of view, and
3+
participate. For the latest version of our Code of Conduct, please
4+
see
5+
6+
https://community.torproject.org/policies/code_of_conduct/

CONTRIBUTING

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Contributing to Tor
2+
-------------------
3+
4+
### Getting started
5+
6+
Welcome!
7+
8+
We have a bunch of documentation about how to develop Tor in the
9+
doc/HACKING/ directory. We recommend that you start with
10+
doc/HACKING/README.1st.md , and then go from there. It will tell
11+
you how to find your way around the source code, how to get
12+
involved with the Tor community, how to write patches, and much
13+
more!
14+
15+
You don't have to be a C developer to help with Tor: have a look
16+
at https://www.torproject.org/getinvolved/volunteer !
17+
18+
The Tor Project is committed to fostering a inclusive community
19+
where people feel safe to engage, share their points of view, and
20+
participate. For the latest version of our Code of Conduct, please
21+
see
22+
23+
https://gitweb.torproject.org/community/policies.git/plain/code_of_conduct.txt
24+
25+
26+
27+
### License issues
28+
29+
Tor is distributed under the license terms in the LICENSE -- in
30+
brief, the "3-clause BSD license". If you send us code to
31+
distribute with Tor, it needs to be code that we can distribute
32+
under those terms. Please don't send us patches unless you agree
33+
to allow this.
34+
35+
Some compatible licenses include:
36+
37+
- 3-clause BSD
38+
- 2-clause BSD
39+
- CC0 Public Domain Dedication

0 commit comments

Comments
 (0)