Commit graph

1063 commits

Author SHA1 Message Date
meskio
1d592b06e5
Implement String() method on events
To make it safe for logging safelog.Scrub function is now public.

Closes: #40141
2022-05-25 18:09:06 +02:00
itchyonion
9757784c5a
Wait some time before displaying the proxy usage log 2022-05-25 11:01:01 -04:00
Cecylia Bocovich
dd83b68efa
Bump version of pion/webrtc to v3.1.41
This bumps the version of pion/dtls to v2.1.5 to fix three CVEs:
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-29189
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-29190
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-29222
2022-05-24 11:45:47 -04:00
Cecylia Bocovich
b6875c6ae9
Bump webrtc library version
go get github.com/pion/webrtc/v3@latest
go mod tidy
2022-04-12 12:10:01 -04:00
itchyonion
e2838201ad
Scrub ptEvent logs 2022-04-12 11:52:21 -04:00
Cecylia Bocovich
aab806429f
Fix gitlab CI to work with multiple client .go files 2022-04-11 11:50:36 -04:00
Cecylia Bocovich
d807e9d370
Move tor-specific code outside of client library 2022-04-11 11:38:52 -04:00
Arlo Breault
2f89fbc2ed Represent fingerprint internally as byte array 2022-03-31 11:28:00 -04:00
Arlo Breault
fa2f6824d9 Add some test cases for client poll requests 2022-03-21 15:31:02 -04:00
Arlo Breault
b563141c6a Forward bridge fingerprint
gitlab 28651
2022-03-21 15:06:05 -04:00
Arlo Breault
281d917beb Stop storing version in ClientPollRequest
This continues to asserts the known version while decoding.  The client
will only ever generate the latest version while encoding and if the
response needs to change, the impetus will be a new feature, set in the
deserialized request, which can be used as a distinguisher.
2022-03-21 15:06:05 -04:00
meskio
b73add1550
Make the proxy type configurable for users of the library
Closes: #40104
2022-03-21 19:24:51 +01:00
meskio
b265bd3092
Make easier to extend the list of known proxy types
And include iptproxy as a valid proxy type.
2022-03-21 19:23:49 +01:00
Arlo Breault
bd636a1374 Introduce an unexported newBrokerChannelFromConfig
A follow-up wants to pass in a new property from the ClientConfig but it
would be an API breaking change to NewBrokerChannel.

However, it's unclear why NewBrokerChannel is exported at all.  No other
package in the repo depends on it and the known users of the library
probably wouldn't be construct them.

While this patch was being reviewed, a new constructor was added,
NewBrokerChannelWithUTLSSettings, with effectively the same issue.
Both of those exported ones are deleted here.
2022-03-16 16:33:24 -04:00
Arlo Breault
829cacac5f Parse ClientPollRequest version in DecodeClientPollRequest
Instead of IPC.ClientOffers.  This makes things consistent with
EncodeClientPollRequest which adds the version while serializing.
2022-03-16 15:43:10 -04:00
Arlo Breault
6fd0f1ae5d Rename *PollRequest methods to distinguish client/proxy 2022-03-16 15:43:10 -04:00
Shelikhoo
6e29dc676c
Add document for NewUTLSHTTPRoundTripper 2022-03-16 09:13:30 +00:00
Shelikhoo
ab9604476e
Move uTLS configuration to socks5 arg 2022-03-16 09:13:30 +00:00
Shelikhoo
3132f68012
Add connection expire time for uTLS pendingConn 2022-03-16 09:13:29 +00:00
Shelikhoo
8d5998b744
Harmonize identifiers to uTLS 2022-03-16 09:13:29 +00:00
Shelikhoo
e3aeb5fe5b
Add line wrap to NewBrokerChannelWithUTlsSettings 2022-03-16 09:13:29 +00:00
Shelikhoo
f525490032
Update utls test to match uTLS Round Tripper constructor 2022-03-16 09:13:29 +00:00
Shelikhoo
1573502e93
Use uTLS aware broker channel constructor 2022-03-16 09:13:29 +00:00
Shelikhoo
ccfdcab8fe
Add uTLS remove SNI to snowflake client 2022-03-16 09:13:29 +00:00
Shelikhoo
9af0ad119b
Add utls imitate setting to snowflake client 2022-03-16 09:13:29 +00:00
Max Bittman
c1c3596cf8
Add name to utls client hello id 2022-03-16 09:13:28 +00:00
Shelikhoo
c1b0f763ef
Add reformat for utls roundtripper 2022-03-16 09:13:28 +00:00
Shelikhoo
4447860661
Add repeated test for utls roundtripper 2022-03-16 09:13:28 +00:00
Shelikhoo
006abdead4
Add utls roundtripper 2022-03-16 09:13:25 +00:00
meskio
19e9e38415
Merge remote-tracking branch 'gitlab/mr/78' 2022-03-11 19:58:17 +01:00
Jake Vossen
99eb794a20
Fixed up/downstream metrics 2022-03-02 11:27:33 -05:00
pjsier
df22114fce Fix proxy logging verb tense 2022-02-28 18:38:17 -06:00
Anna “CyberTailor”
e18a4ac147
Generate tarballs in release CI
The `generate_tarball` job vendors all Go modules to make packaging for
distributions easier.
2022-02-27 10:01:50 +05:00
Cecylia Bocovich
01ae5b56e8
Fix client library test
Initialize eventsLogger for WebRTCPeer in client library test.
2022-02-14 15:11:41 -05:00
Cecylia Bocovich
3547b284a9
Make all snowflake events LogSeverityNotice
Let's reserve Tor error logs for more severe events that indicate
a client-side bug or absolute failure. By default, tor logs at severity
level notice (and above).
2022-02-14 14:09:16 -05:00
Cecylia Bocovich
2c008d6589
Add connection failure events for proxy timeouts
This change adds two new connection failure events for snowflake
proxies. One fires when the datachannel times out and another fires when
the connection to the proxy goes stale.
2022-02-14 14:00:01 -05:00
Cecylia Bocovich
bcc162898a
Initialize SnowflakeListener.closed
Fixes a bug where an uninitialized channel causes a panic when closed
(#40099).
2022-02-08 13:00:43 -05:00
Cecylia Bocovich
e6e5e20ae8
Update ChangeLog for v2.1.0 release 2022-02-08 10:56:19 -05:00
Cecylia Bocovich
c0b35076c9
Remove support for oneshot mode
Due to a bug (#40098), legacy oneshot connections have not worked for
awhile. Connections without the turbotunnel token would cause the server
to crash. This fixes that bug by removing support altogether and simply
closes the connection.
2022-02-07 11:39:23 -05:00
Shelikhoo
00e8415d8e
Add verbosity switch to suppress diagnostic output 2022-02-03 13:38:48 +00:00
Shelikhoo
e828b06076
Use log instead of fmt in proxy event logger
See also:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/72#note_2772839
2022-01-28 14:46:45 +00:00
Shelikhoo
bf3bd635f7
Fix build break in Go 1.16 for missing import
See also:
https://gitlab.torproject.org/shelikhoo/snowflake/-/jobs/86751
2022-01-26 13:39:12 +00:00
Shelikhoo
eb229d512b
Fix ProxyEventLogger output 2022-01-25 13:03:19 +00:00
Shelikhoo
88af9da4a2
Fix ProxyEventLogger output 2022-01-25 13:03:19 +00:00
Shelikhoo
1116bc81c8
Add Proxy Event Logger 2022-01-25 13:03:19 +00:00
Shelikhoo
9208364475
Extract traffic formatter 2022-01-25 13:03:19 +00:00
Shelikhoo
f12cfe6a9f
Add proxy event logger state propagate 2022-01-25 13:03:18 +00:00
Shelikhoo
e4305a4d2b
Add EventOnProxyConnectionOver Reporting 2022-01-25 13:03:18 +00:00
Shelikhoo
d64af31394
Add EventOnProxyConnectionOver Event 2022-01-25 13:03:18 +00:00
Shelikhoo
91379a42f3
Add Raw Data Output for bytesLogger 2022-01-25 13:03:14 +00:00