Skip to content

Commit f9c8405

Browse files
author
Delta-Kronecker
committed
Import Tor 0.4.9.11 source (upstream) + CI build workflow
0 parents  commit f9c8405

1,463 files changed

Lines changed: 1322320 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.

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* text=auto
2+
3+
*.sh text eol=lf
4+
configure text eol=lf
5+
autogen.sh text eol=lf
6+
*.ac text eol=lf
7+
*.m4 text eol=lf
8+
*.in text eol=lf
9+
10+
*.ps1 text eol=crlf

.github/workflows/build.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Build Tor
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
tor-linux:
13+
name: tor (Linux x86_64)
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y build-essential pkg-config \
22+
libevent-dev libssl-dev zlib1g-dev liblzma-dev libzstd-dev
23+
24+
- name: Configure
25+
run: |
26+
chmod +x configure
27+
./configure --enable-static-tor \
28+
--disable-asciidoc --disable-man --disable-html-docs
29+
30+
- name: Build
31+
run: make -j$(nproc)
32+
33+
- name: Smoke test
34+
run: ./src/app/tor --version
35+
36+
- name: Upload artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: tor-linux-x86_64
40+
path: src/app/tor
41+
42+
tor-win64:
43+
name: tor (Windows x86_64)
44+
runs-on: windows-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- uses: msys2/setup-msys2@v2
49+
with:
50+
msystem: MINGW64
51+
update: false
52+
install: >-
53+
mingw-w64-x86_64-gcc
54+
mingw-w64-x86_64-binutils
55+
make
56+
mingw-w64-x86_64-pkgconf
57+
mingw-w64-x86_64-libevent
58+
mingw-w64-x86_64-openssl
59+
mingw-w64-x86_64-zlib
60+
61+
- name: Configure
62+
shell: msys2 {0}
63+
run: |
64+
cd "$GITHUB_WORKSPACE"
65+
chmod +x configure
66+
./configure --host=x86_64-w64-mingw32 \
67+
--enable-static-tor \
68+
--disable-asciidoc --disable-man --disable-html-docs
69+
70+
- name: Build
71+
shell: msys2 {0}
72+
run: |
73+
cd "$GITHUB_WORKSPACE"
74+
make -j$(nproc)
75+
76+
- name: Smoke test
77+
shell: msys2 {0}
78+
run: |
79+
cd "$GITHUB_WORKSPACE"
80+
./src/app/tor.exe --version
81+
82+
- name: Upload artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: tor-win64
86+
path: src/app/tor.exe
87+
88+
transports:
89+
name: pluggable-transports (Windows x86_64)
90+
runs-on: ubuntu-latest
91+
continue-on-error: true
92+
steps:
93+
- uses: actions/setup-go@v5
94+
with:
95+
go-version: "1.24"
96+
97+
- name: Build obfs4proxy
98+
run: |
99+
GOOS=windows GOARCH=amd64 go build -o obfs4proxy.exe github.com/Yawning/obfs4/obfs4proxy
100+
101+
- name: Build snowflake client
102+
run: |
103+
GOOS=windows GOARCH=amd64 go build -o snowflake-client.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client
104+
105+
- name: Build webtunnel client
106+
run: |
107+
GOOS=windows GOARCH=amd64 go build -o webtunnel.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/client
108+
109+
- name: Upload artifact
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: transports-win64
113+
path: |
114+
obfs4proxy.exe
115+
snowflake-client.exe
116+
webtunnel.exe

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Build artifacts
2+
Makefile
3+
Makefile.in.bak
4+
*.o
5+
*.lo
6+
*.la
7+
*.a
8+
*.so
9+
*.dll
10+
*.exe
11+
*.gcda
12+
*.gcno
13+
src/app/tor
14+
src/app/tor.exe
15+
src/or/tor
16+
src/or/tor.exe
17+
src/test/test
18+
src/test/test.exe
19+
config.log
20+
config.status
21+
config.cache
22+
autom4te.cache/
23+
.build_config/
24+
stamp-h1
25+
orconfig.h
26+
src/or/orconfig.h
27+
doc/asciidoc-helper
28+
doc/HACKING/asciidoc-helper
29+
30+
# Editor / OS
31+
.DS_Store
32+
Thumbs.db

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)