Commit graph

1341 commits

Author SHA1 Message Date
meskio
6b0421db0d
Merge remote-tracking branch 'gitlab/mr/195' 2023-10-24 12:50:27 +02:00
Renovate Bot
fc7053acd5 chore(deps): update module github.com/prometheus/client_model to v0.5.0 2023-10-23 13:10:46 +00:00
Renovate Bot
ef6f8dd500
chore(deps): update module golang.org/x/net to v0.17.0 [security] 2023-10-23 14:00:09 +01:00
Renovate Bot
251a151bf5 chore(deps): update module github.com/xtaci/kcp-go/v5 to v5.6.5 2023-10-20 15:40:01 +00:00
meskio
b11a41482c
Use go 1.21 in renovate 2023-10-16 20:48:47 +02:00
Shelikhoo
bd7391d678
update version to 2.7.0 2023-10-16 15:14:51 +01:00
KokaKiwi
7142fa3ddb
fix(proxy): Correctly close connection pipe when dealing with error 2023-10-12 15:52:43 +01:00
David Fifield
6393af6bab
Remove proxy churn measurements from broker.
We've done the analysis we planned to do on these measurements.

A program to analyze the proxy churn and extract hour-by-hour
intersections is available at:
https://github.com/turfed/snowflake-paper/tree/main/figures/proxy-churn

Closes #40280.
2023-10-09 16:16:05 +01:00
WofWca
a615e8b1ab
fix(proxy): remove _potential_ deadlock
The `dc.Send()` should increase the `bufferedAmount` value,
so there is no need to add the message length a second time.

Also replace GT with GE, for the case where
`BufferedAmountLowThreshold === maxBufferedAmount`

Currently the deadlock cannot happen because `maxBufferedAmount`
and `BufferedAmountLowThreshold` are too far apart, in fact
the former is 2x the latter.

See
- https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/144#note_2902956
- https://github.com/pion/webrtc/pull/2473
- https://github.com/pion/webrtc/pull/2474
2023-10-09 15:15:45 +01:00
Cecylia Bocovich
d434549df8
Maintain backward compatability with old clients
Introduce a new commandline and SOCKS argument for comma-separated
domain fronts rather than repurposing the old one so that we can
maintain backwards compatability with users running old versions of the
client. A new bridge line shared on circumvention settings could have
both the front= and fronts= options set.
2023-10-05 17:51:56 -04:00
Cecylia Bocovich
9fdfb3d1b5
Randomly select front domain from comma-separated list
This commmit changes the command-line and Bridge line arguments to take
a comma-separated list of front domains. The change is backwards
compatible with old Bridge and ClientTransportPlugin lines. At
rendezvous time, a front domain will be randomly chosen from the list.
2023-10-05 17:51:56 -04:00
WofWca
4ff36e3f07 improvement(broker): don't reject unrestricted client if there are no restricted proxies
I.e. match it with an unrestricted proxy (if there is one).

The old behavior exists since the inception of the restricted vs
unrestricted feature, i.e. 0052c0e10c
2023-10-02 21:39:56 +04:00
Shelikhoo
5cdf52c813
Update dependencies 2023-09-27 13:15:50 +01:00
Renovate Bot
1559963f75
chore(deps): update module github.com/xtaci/kcp-go/v5 to v5.6.3 2023-09-25 15:21:28 +01:00
Shelikhoo
60e66beadc
Remove Golang 1.20 from CI Testing 2023-09-25 14:27:23 +01:00
Shelikhoo
1d069ca71d
Update CI targets to test android from golang 1.21 2023-09-20 20:05:28 +01:00
Cecylia Bocovich
3a050c6bb3
Use ShouldBeNil to check for nil values 2023-09-20 12:34:51 -04:00
Renovate Bot
e45e8e555b
chore(deps): update module github.com/smartystreets/goconvey to v1.8.1 2023-09-20 12:34:49 -04:00
Renovate Bot
f47ca18e64 chore(deps): update module gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib to v1.5.0 2023-09-19 16:06:59 +00:00
Renovate Bot
106da49c27 chore(deps): update module github.com/pion/webrtc/v3 to v3.2.20 2023-09-19 15:49:22 +00:00
Cecylia Bocovich
2844ac6a13
Update CI targets to include only Go 1.20 and 1.21
To keep up with our dependencies, we no longer support versions of Go
older than v1.20.
2023-09-19 11:42:31 -04:00
Renovate Bot
f4e1ab90c8 chore(deps): update module golang.org/x/net to v0.15.0 2023-09-19 14:09:33 +00:00
Renovate Bot
caaff7004e Update module golang.org/x/sys to v0.12.0 2023-09-12 15:44:11 +00:00
Shelikhoo
b5d702f483
update version to v2.6.1 2023-09-11 14:30:00 +01:00
Renovate Bot
a3bfc2802a
Update module golang.org/x/crypto to v0.12.0 2023-08-28 16:37:52 +01:00
Renovate Bot
e37e15ab7c
Update golang Docker tag to v1.21 2023-08-25 17:21:48 +01:00
Cecylia Bocovich
b632c7d49c
Workaround for shadow in lieu of AF_NETLINK support
For details, see https://github.com/shadow/shadow/issues/2980
2023-08-24 16:33:22 +01:00
Renovate Bot
0cb2975fd8
Update module golang.org/x/net to v0.13.0 [SECURITY] 2023-08-24 13:56:29 +01:00
meskio
f73fe6ec00
Keep the 'v' from the tag on the released .tar.gz
Gitlab doesn't support '#v' expansion for the links name and url:
https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html
https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html#gitlab-internal-variable-expansion-mechanism

The current releases include a 'snowflake-.tar.gz' that gives a 404,
because the link provided is missing the tag part. Let's keep it
simple and produce a tar.gz with the v in the name like
snowflake-v2.6.0.tar.gz

Closes: #40282
2023-08-14 08:56:56 +02:00
David Fifield
8104732114 Change DefaultRelayURL back to wss://snowflake.torproject.net/.
Fixes #40283. Compare to #31522.
2023-07-29 22:33:26 +00:00
am3o
d932cb2744
feat: add option to expose the stats by using metrics 2023-07-28 14:23:22 +01:00
meskio
af73ab7d1f
Add renovate config
Closes: #40194
2023-07-03 20:01:18 +02:00
meskio
aaeab3f415
Update dependencies
So renovate doesn't create tons of merge requests.
2023-07-03 19:52:57 +02:00
David Fifield
58c3121c6b Close temporary UDPSession in TestQueuePacketConnWriteToKCP.
With these not being closed, they were continuing to consume resources
after the return of the test function, which was affecting the later
BenchmarkSendQueue.

Before:
```
snowflake/common/turbotunnel$ go test -bench BenchmarkSendQueue -v
=== RUN   TestQueueIncomingOversize
--- PASS: TestQueueIncomingOversize (0.00s)
=== RUN   TestWriteToOversize
--- PASS: TestWriteToOversize (0.00s)
=== RUN   TestRestoreMTU
--- PASS: TestRestoreMTU (0.00s)
=== RUN   TestRestoreCap
--- PASS: TestRestoreCap (0.00s)
=== RUN   TestQueuePacketConnWriteToKCP
--- PASS: TestQueuePacketConnWriteToKCP (1.01s)
goos: linux
goarch: amd64
pkg: gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/turbotunnel
cpu: Intel(R) Core(TM) i5 CPU         680  @ 3.60GHz
BenchmarkSendQueue
BenchmarkSendQueue-4     8519708               136.0 ns/op
PASS
ok      gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/turbotunnel  3.481s
```

After:
```
snowflake/common/turbotunnel$ go test -bench BenchmarkSendQueue -v
=== RUN   TestQueueIncomingOversize
--- PASS: TestQueueIncomingOversize (0.00s)
=== RUN   TestWriteToOversize
--- PASS: TestWriteToOversize (0.00s)
=== RUN   TestRestoreMTU
--- PASS: TestRestoreMTU (0.00s)
=== RUN   TestRestoreCap
--- PASS: TestRestoreCap (0.00s)
=== RUN   TestQueuePacketConnWriteToKCP
--- PASS: TestQueuePacketConnWriteToKCP (1.02s)
goos: linux
goarch: amd64
pkg: gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/turbotunnel
cpu: Intel(R) Core(TM) i5 CPU         680  @ 3.60GHz
BenchmarkSendQueue
BenchmarkSendQueue-4    11620237               105.7 ns/op
PASS
ok      gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/turbotunnel  3.244s
```
2023-06-29 21:12:29 +00:00
David Fifield
80980a3afb Fix a comment left over from turbotunnel-quic. 2023-06-29 19:59:50 +00:00
Cecylia Bocovich
08d1c6d655
Bump minimum required version of go
The version of x/sys we're using requires go1.17 or later
2023-06-20 14:52:09 -04:00
Cecylia Bocovich
2fa8fd9188
Update version to v2.6.0 2023-06-19 12:52:25 -04:00
Vort
ea01c92cf1
Implement DataChannel flow control 2023-06-19 17:44:45 +01:00
Cecylia Bocovich
f8eb86f24d
Append Let's Encrypt ISRG Root X1 to cert pool
This is a workaround for older versions of android that do not trust
the Let's Encrypt root certificate.
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40087
2023-06-14 18:12:29 -04:00
David Fifield
9edaee6547 Use IP_BIND_ADDRESS_NO_PORT when dialing the ORPort on Linux.
When the orport-srcaddr option is set, we bind to a source IP address
before dialing the ORPort/ExtORPort. tor similarly binds to a source IP
address when OutboundBindAddress is set in torrc. Since tor 0.4.7.13,
tor sets IP_BIND_ADDRESS_NO_PORT, and because problems arise when some
programs use IP_BIND_ADDRESS_NO_PORT and some do not, we also have to
start using IP_BIND_ADDRESS_NO_PORT when we upgrade tor
(tpo/anti-censorship/pluggable-transports/snowflake#40270).

Related: tpo/anti-censorship/pluggable-transports/snowflake#40198
2023-06-08 13:24:22 -06:00
itchyonion
130b63ccdd
use debian buster and bullseye as base images 2023-06-08 00:51:42 -07:00
meskio
82cc0f38f7
Move the development to gitlab
Related: tpo/anti-censorship/team#86
2023-05-31 10:01:47 +02:00
itchyonion
88608ad44a
Broker: add warning log when proxy couldn't mach with client 2023-05-29 10:12:48 -07:00
itchyonion
6c431800b0
Broker: update unit tests after adding SDP validation 2023-05-29 10:12:48 -07:00
itchyonion
255cee69ed
Broker: soften non-critical log from error to warning 2023-05-29 10:12:48 -07:00
itchyonion
07b5f07452
Validate SDP offers and answers 2023-05-29 10:12:48 -07:00
David Fifield
8e5ea82611 Add a scanner error check to ClusterCounter.Count.
It was silently exiting at the "recordingStart":"2022-09-23T17:06:59.680537075Z"
line, the first line whose length (66873) exceeds
bufio.MaxScanTokenSize. Now distinctcounter exits with an error status
instead of reporting partial results.

$ ./distinctcounter -from 2023-01-01T00:00:00Z -to 2023-01-10T00:00:00Z -in metrics-ip-salted.jsonl
2023/04/20 13:54:11 unable to count:bufio.Scanner: token too long
2023-04-20 11:28:58 -04:00
meskio
f723cf52e8
Merge remote-tracking branch 'gitlab/main' 2023-04-20 16:37:52 +02:00
meskio
297ca91b1d
Use goptlib from gitlab.torproject.org 2023-04-19 17:15:35 +02:00
David Fifield
c097d5f3bc Use a sync.Pool to reuse packet buffers in QueuePacketConn.
This is meant to reduce overall allocations. See past discussion at
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40260#note_2885524 ff.
2023-04-04 20:22:32 -06:00