Skip to content
Open
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
298e624
Fixup build scripts
cbeuw Dec 20, 2020
0d3f8dd
Allow DatabasePath to be empty if user info database is never used
cbeuw Dec 21, 2020
de0daac
Update deprecated curve25519 functions and defend against low-order p…
cbeuw Dec 21, 2020
c9ac93b
Refactor session_test.go
cbeuw Dec 21, 2020
3633c9a
Fix multiplex test as test payload length may be randomised to 0
cbeuw Dec 22, 2020
42f36b9
Achieve zero allocation when writing data through stream
cbeuw Dec 22, 2020
badda76
Improve data receive benchmark
cbeuw Dec 22, 2020
4bc80af
Lazily allocate stream receiving buffer
cbeuw Dec 22, 2020
104117c
Fix one instance of not accessing recvBuf via the getter
cbeuw Dec 22, 2020
5a3f63f
Reduce allocation of frame objects on receiving data
cbeuw Dec 22, 2020
ff503b0
Only allocate and copy frame object into sorter heap when necessary (…
cbeuw Dec 22, 2020
fd5005d
Fix a timing sensitive test on reading data after actively closing a …
cbeuw Dec 22, 2020
35f4142
Use default hashmap to store streams. Avoid allocating a stream objec…
cbeuw Dec 22, 2020
4d16127
Use a buffer pool to reduce contentions in tls wrapper
cbeuw Dec 23, 2020
dc030fb
Implement UDP stream timeout. (#148)
notsure2 Dec 23, 2020
3e73771
Use assert.Eventually to correctly handle more timing sensitive tests
cbeuw Dec 23, 2020
5c5e9f8
Prevent unnecessary allocation in stream closing
cbeuw Dec 23, 2020
9108794
Fix race condition in allocating obfsBuf
cbeuw Dec 23, 2020
53f0116
Fix race condition in the use of assert.Eventually
cbeuw Dec 23, 2020
0209bcd
Fix race condition in steam closing. Fall back to temp buffer allocation
cbeuw Dec 23, 2020
a97f575
Fix race condition in tests
cbeuw Dec 23, 2020
70a9723
Temp fix to testing reading after closing a stream
cbeuw Dec 23, 2020
3b24c33
Remove incorrect concurrent uses of testing.T.Fatal
cbeuw Dec 23, 2020
4209483
Reduce memory pressure in tests
cbeuw Dec 23, 2020
5933ad8
Replace bytes.Buffer with vanilla []byte in tls wrapper
cbeuw Dec 24, 2020
881f6e6
Use sync.Pool for obfuscation buffer
cbeuw Dec 24, 2020
4f34e69
Use pooled buffer for session closing frame
cbeuw Dec 24, 2020
2f17841
Use Compare-And-Swap for atomic booleans indicating session and switc…
cbeuw Dec 25, 2020
415523f
Refactor obfuscate and deobfuscate functions to reduce a layer of ind…
cbeuw Dec 26, 2020
2d08e88
Use a sync.Pool to remove the global random bottleneck in picking a r…
cbeuw Dec 26, 2020
3ad04aa
Add latency benchmark
cbeuw Dec 26, 2020
cbd71fa
Control flow optimisations
cbeuw Dec 26, 2020
d1b05ee
Add new encryption method option aes-128-gcm
cbeuw Dec 27, 2020
57bb437
Log timestamp
cbeuw Dec 27, 2020
e0b97db
Add unordered benchmark for RecvDataFromRemote
cbeuw Dec 27, 2020
23b32b6
Latency benchmark
cbeuw Dec 27, 2020
8fbb2dd
Add more data reception tests
cbeuw Dec 28, 2020
f322f8b
Randomise echo test data
cbeuw Dec 28, 2020
661db9d
Correctly copy frame payload in frame sorter
cbeuw Dec 28, 2020
c60c6d8
Avoid assigning functions to variables in hot path
cbeuw Dec 28, 2020
fd695db
Reduce unnecessary test bloat
cbeuw Dec 28, 2020
5cb54aa
Correctly fallthrough to fix client configuration compatibility
cbeuw Dec 28, 2020
eee8209
Revert "Refactor obfuscate and deobfuscate functions to reduce a laye…
cbeuw Dec 28, 2020
2c709f9
Correctly assign payloadCipher to Obfuscator field, and add test for …
cbeuw Dec 28, 2020
65443da
Merge branch 'master' into obfs-fix
cbeuw Dec 28, 2020
439b7f0
Improve encapsulation
cbeuw Dec 28, 2020
8dd4ae4
Better conform message data length to TLS standards
cbeuw Dec 29, 2020
4a2eac5
Cleanup some tests using testify/assert
cbeuw Dec 29, 2020
8ab0c2d
Redo the implementation of switchboard and remove the need for connId
cbeuw Dec 28, 2020
b4d65d8
Use sync.Map for lock free pickRandConn
cbeuw Dec 29, 2020
603b614
Control flow optimisation in picking switchboard strategy
cbeuw Dec 29, 2020
2bcb4a4
Fix RecvDataFromRemote benchmark
cbeuw Dec 31, 2020
a643402
Remove redundant lazy allocation
cbeuw Dec 31, 2020
f27889a
Allow partial json to be POSTed to admin/user/{UID} for only updating…
cbeuw Jan 5, 2021
32494b8
Prevent recvBufferSizeLimit from overflowing signed 32-bit integer
cbeuw Jan 9, 2021
91106f3
Prevent terminal msg from being overwritten to later concurrent writes
cbeuw Jan 12, 2021
ae14e28
ServerName rotation (#158)
lima0 Mar 25, 2021
88f41f7
Add native support for Apple Silicon
cbeuw Mar 25, 2021
365f52a
Add example usage of AlternativeNames config option
cbeuw Mar 26, 2021
8709bc0
Update Firefox signature to version 88
cbeuw Apr 30, 2021
cfdff93
Update Chrome version comment (actual signature remains the same)
cbeuw Apr 30, 2021
387b76d
Support CloudFlare CDN. Fixes #155
notsure2 Jul 22, 2021
9d5c663
Fix incorrect addition of empty name in MockDomainList if the config …
notsure2 Jul 22, 2021
d73f464
Merge pull request #167 from notsure2/support-cloudflare
cbeuw Jul 24, 2021
121c27f
Merge pull request #168 from notsure2/fix-empty-alternative-names
cbeuw Jul 24, 2021
99c4c77
Update Go version
cbeuw Sep 2, 2021
67dba8c
Return empty slices instead of nil for ListAllUsers
cbeuw Jan 26, 2022
e157e73
Check proxy method after checking admin uid to allow admin to have an…
cbeuw Jan 26, 2022
611bad9
Minor refactors to remove unnecessary function
cbeuw Feb 2, 2022
7503401
Update browser fingerprint versions (no actual fingerprint change)
cbeuw Feb 2, 2022
847b7e2
Update dependencies
cbeuw Feb 2, 2022
8e07491
Update README.md
cbeuw Feb 24, 2022
39306cf
Update README.md
cbeuw Feb 25, 2022
9e2549c
Fix typo in README
moonburnt Mar 20, 2022
68f47f1
Merge pull request #184 from moonburnt/master
cbeuw Mar 20, 2022
f67ae6e
Update chrome fingerprint
HirbodBehnam Mar 23, 2022
9614fbc
Update firefox fingerprint
HirbodBehnam Mar 24, 2022
e305871
Merge pull request #186 from HirbodBehnam/master
cbeuw Mar 31, 2022
e696b18
format using goimports
Mar 6, 2023
11e42dd
Add WebSocket path for CDN mode
Mar 6, 2023
6fe603c
Fix gox not found in release CI
Mar 7, 2023
0e0ec0e
Merge pull request #216 from githablocal/master
cbeuw Mar 7, 2023
b8f04c9
Bump golang.org/x/crypto from 0.0.0-20220131195533-30dcbda58838 to 0.1.0
dependabot[bot] Mar 22, 2023
646a323
Merge pull request #217 from cbeuw/dependabot/go_modules/golang.org/x…
cbeuw Mar 22, 2023
641f6b2
Update to Chrome and Firefox 112
cbeuw Apr 22, 2023
bc67074
Add Safari browser signature
cbeuw Apr 22, 2023
d04366e
Fix padding calculation
cbeuw Apr 23, 2023
59919e5
Remove gopacket dependency due to pcap
cbeuw Apr 23, 2023
fcb600e
Print binary sha256 in release
cbeuw Apr 23, 2023
eca5f13
Remove WriteTo from recvBuffer to prevent blocking on external Writer.
cbeuw Nov 12, 2023
b3ec1ab
Make server respond with a TLS 1.3 cipher suite
cbeuw Feb 9, 2024
6417e33
Use utls for ClientHello fingerprint
cbeuw Feb 9, 2024
b9907c2
Disable codecov check
cbeuw Feb 9, 2024
c5b31de
Configure Renovate (#248)
renovate[bot] Feb 9, 2024
c48a880
Remove old utls
cbeuw Feb 9, 2024
6b08af0
Update go mod so it builds on nix
BANanaD3V Mar 10, 2024
82687d4
Merge pull request #256 from BANanaD3V/master
cbeuw Apr 11, 2024
1cc4a1f
Update module github.com/refraction-networking/utls to v1.6.4
renovate[bot] Apr 11, 2024
767716b
Merge pull request #251 from cbeuw/renovate/github.amrom.workers.dev-refraction-net…
cbeuw Apr 11, 2024
de1c760
Update dependencies
cbeuw Apr 11, 2024
a848d2f
Update go version and release script
cbeuw Apr 13, 2024
3b449b6
Support ServerName randomization (by setting ServerName=random) using…
notsure2 Jun 10, 2023
392fc41
Move random utilities to common package
cbeuw Apr 13, 2024
d5da5d0
Update copyright
cbeuw Apr 13, 2024
de4dab6
Merge pull request #242 from notsure2/random-sni
cbeuw Apr 13, 2024
5988b43
Stop using fixedConnMapping
cbeuw Apr 14, 2024
dc2e83f
Move to common.RandInt
cbeuw Apr 14, 2024
b3c6426
Update module github.com/refraction-networking/utls to v1.6.6
renovate[bot] May 3, 2024
97a0313
Merge pull request #262 from cbeuw/renovate/github.amrom.workers.dev-refraction-net…
cbeuw Jun 16, 2024
3687087
Fix spelling mistake
zestysoft Sep 21, 2024
deb0d26
Build and push docker image on release
cbeuw Oct 1, 2024
e362e81
Add backwards compatibility CI job
cbeuw Oct 1, 2024
bfaf46d
Update actions
cbeuw Oct 3, 2024
5867fa9
Merge pull request #281 from zestysoft/faliure_typo
cbeuw Oct 3, 2024
19c8cd1
Merge pull request #285 from cbeuw/docker-tests
cbeuw Oct 3, 2024
5cf975f
Pad the first 5 frames
cbeuw Oct 1, 2024
8bbc7b0
Fix tests
cbeuw Oct 1, 2024
d229d8b
Merge pull request #283 from cbeuw/padding
cbeuw Oct 3, 2024
64166bf
chore: doc link fix
zaferatli Jan 1, 2025
cfdd5e6
Merge pull request #294 from zaferatli/docFix
cbeuw Apr 30, 2025
07aa197
Go mod tidy
cbeuw Apr 30, 2025
9800e36
Update deps
cbeuw Apr 30, 2025
d06c208
Fix IP resolution in test
cbeuw Apr 30, 2025
c15fd73
Update Go in CI
cbeuw Apr 30, 2025
7f9c174
Merge pull request #308 from cbeuw/deps-20250430
cbeuw Apr 30, 2025
5146ea8
Increase server first packet buffer size to 3000
cbeuw Jun 7, 2025
51ed286
Update utls to 1.7.3
cbeuw Jun 7, 2025
8af1376
Add backwards compatibility fallback to firefox
cbeuw Jun 8, 2025
49357fc
Merge pull request #310 from cbeuw/utls-1.7.0
cbeuw Jun 8, 2025
8f629c7
fix(deps): update module github.com/refraction-networking/utls to v1.8.0
renovate[bot] Jul 22, 2025
c3d5470
Merge pull request #312 from cbeuw/renovate/github.amrom.workers.dev-refraction-net…
cbeuw Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix IP resolution in test
  • Loading branch information
cbeuw committed Apr 30, 2025
commit d06c208acee50e7acfe88be11139877399c82d24
30 changes: 24 additions & 6 deletions internal/server/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@ func TestParseRedirAddr(t *testing.T) {
t.Errorf("parsing %v error: %v", domainNoPort, err)
return
}
expHost, err := net.ResolveIPAddr("ip", "example.com")

expIPs, err := net.LookupIP("example.com")
if err != nil {
t.Errorf("tester error: cannot resolve example.com: %v", err)
return
}
if host.String() != expHost.String() {
t.Errorf("expected %v got %v", expHost.String(), host.String())

contain := false
for _, expIP := range expIPs {
if expIP.String() == host.String() {
contain = true
}
}

if !contain {
t.Errorf("expected one of %v got %v", expIPs, host.String())
}
if port != "" {
t.Errorf("port not empty when there is no port")
Expand All @@ -63,13 +72,22 @@ func TestParseRedirAddr(t *testing.T) {
t.Errorf("parsing %v error: %v", domainWPort, err)
return
}
expHost, err := net.ResolveIPAddr("ip", "example.com")

expIPs, err := net.LookupIP("example.com")
if err != nil {
t.Errorf("tester error: cannot resolve example.com: %v", err)
return
}
if host.String() != expHost.String() {
t.Errorf("expected %v got %v", expHost.String(), host.String())

contain := false
for _, expIP := range expIPs {
if expIP.String() == host.String() {
contain = true
}
}

if !contain {
t.Errorf("expected one of %v got %v", expIPs, host.String())
}
if port != "80" {
t.Errorf("wrong port: expected %v, got %v", "80", port)
Expand Down