meskio
9e977fe6ca
Report the version of snowflake to the Tor process
2024-07-11 13:39:56 +02:00
meskio
a9df5dd71a
Use ptutil for safelog and prometheus rounded metrics
...
* Related: #40354
2024-05-09 16:24:33 +02:00
Michael Pu
9fe2ca58a0
Switch to sqscreds param for passing in SQS credentials
2024-03-09 13:35:16 -05:00
am3o
acce1f1fd9
refactor: change deprecated "io/ioutil" package to recommended "io" package
2024-02-17 12:47:22 +01:00
Andrew Wang
9b90b77d69
Add unit tests for SQS rendezvous in broker
...
Co-authored-by: Michael Pu <michael.pu@uwaterloo.ca>
2024-01-22 13:11:03 -05:00
Michael Pu
8fb17de152
Implement SQS rendezvous in client and broker
...
This features adds an additional rendezvous method to send client offers
and receive proxy answers through the use of Amazon SQS queues.
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/26151
2024-01-22 13:06:42 -05:00
David Fifield
d0529141ac
Cosmetic fixes taken from !219 .
...
shelikhoo/dev-udp-performance-rebased branch
https://gitlab.torproject.org/shelikhoo/snowflake/-/commits/9dce28cfc2093490473432ffecd9abaab7ebdbdb
2024-01-16 18:43:58 +00:00
Cecylia Bocovich
10fb9afaa7
Check if multiple front domains argument is empty
...
This fixes a regression introduced in 9fdfb3d1
, where the list of front
domains always contained an empty string if none were supplied via the
commandline options, causing rendezvous failures for both amp cache and
domain fronting. This fix checks to see whether the commandline option
was supplied.
2023-10-26 17:04:56 -04:00
Shelikhoo
5df7a06eee
Add outbound proxy configuration propagation
2023-10-24 17:47:25 +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
meskio
82cc0f38f7
Move the development to gitlab
...
Related: tpo/anti-censorship/team#86
2023-05-31 10:01:47 +02:00
meskio
297ca91b1d
Use goptlib from gitlab.torproject.org
2023-04-19 17:15:35 +02:00
Shelikhoo
4ebd85e5d1
add version output to log
2022-11-23 12:29:55 +00:00
Shelikhoo
33248f3dec
Add Version Output Support to Snowflake
...
From now on, there will be a file at common/version/version.go that includes current version number.
2022-11-23 12:29:51 +00:00
meskio
3473b438e5
Move ptEventLogger into the client/snowflake.go
...
Remove client/pt_event_logger.go file as is very minimal.
2022-05-25 18:09:09 +02:00
Cecylia Bocovich
d807e9d370
Move tor-specific code outside of client library
2022-04-11 11:38:52 -04:00
Arlo Breault
b563141c6a
Forward bridge fingerprint
...
gitlab 28651
2022-03-21 15:06:05 -04:00
Shelikhoo
ab9604476e
Move uTLS configuration to socks5 arg
2022-03-16 09:13:30 +00:00
Shelikhoo
8d5998b744
Harmonize identifiers to uTLS
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
Shelikhoo
657aaa6ba8
Refactor event logger setting into function call
...
See also:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/67#note_2770482
2022-01-25 12:49:59 +00:00
Shelikhoo
128936c825
Enable PT Event Logger
2022-01-25 12:49:58 +00:00
Cecylia Bocovich
ead5a960d7
Bump snowflake library imports and go.mod to v2
2021-11-11 10:14:49 -05:00
Cecylia Bocovich
ace8df37ed
Fix compile bug in client, caught by CI
2021-08-24 10:27:24 -04:00
Cecylia Bocovich
a39d6693e1
Call conn.Reject() if SOCKS arguments are invalid
2021-08-19 21:31:51 -04:00
Cecylia Bocovich
e762f58a31
Parse SOCKS arguments and prefer over command line options
...
Parsing the Snowflake client options from SOCKS allow us to specify
snowflake client settings in the bridge lines.
2021-08-19 21:20:34 -04:00
Cecylia Bocovich
4acc08cc60
Use a config struct for snowflake client options
2021-08-19 21:20:34 -04:00
David Fifield
c13810192d
Skeleton of ampCacheRendezvous.
...
Currently the same as httpRendezvous, but activated using the -ampcache
command-line option.
2021-08-05 16:13:24 -06:00
Simone Basso
aefabe683f
fix(client/snowflake.go): prevent wg.Add race condition
...
In VSCode, the staticcheck tool emits this warning:
> should call wg.Add(1) before starting the goroutine to
> avoid a race (SA2000)go-staticcheck
To avoid this warning, just move wg.Add outside.
2021-06-14 10:10:02 +02:00
David Fifield
01a96c7d95
Fix error handling around transport.Dial.
...
The code checked for and displayed an error, but would then go on to
call copyLoop on the nil Conn returned from transport.Dial. Add a return
in that case, and put the cleanup operations in defer. Also remove an
obsolete comment about an empty address. Obsolete because:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/31#note_2733279
2021-05-24 14:40:50 -06:00
Cecylia Bocovich
e87b9175dd
Implement snowflake client lib as PTv2.1 Go API
...
This implements a pluggable transports v2.1 compatible Go API in the
Snowflake client library, and refactors how the main Snowflake program
calls it. The Go API implements the two required client side functions:
a constructor that returns a Transport, and a Dial function for the
Transport that returns a net.Conn. See the PT specification for more
information:
https://github.com/Pluggable-Transports/Pluggable-Transports-spec/blob/master/releases/PTSpecV2.1/Pluggable%20Transport%20Specification%20v2.1%20-%20Go%20Transport%20API.pdf
2021-05-12 09:08:41 -04:00
Cecylia Bocovich
83c01565ef
Update webrtc library to v3.0.0
...
This update required two main changes to how we use the library. First,
we had to make sure we created the datachannel on the offering peer side
before creating the offer. Second, we had to make sure we wait for the
gathering of all candidates to complete since trickle-ice is enabled by
default. See the release notes for more details:
https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0 .
2021-01-12 10:37:26 -05:00
Cecylia Bocovich
8ec8a7cb63
Pass lock to socksAcceptLoop by reference
...
This fixes a bug where we were passing the lock by value to
socksAcceptLoop.
2020-12-16 10:52:19 -05:00
Cecylia Bocovich
effc667544
Wait until all goroutines finish before shutdown
2020-12-05 15:50:16 -05:00
Cecylia Bocovich
b9cc54b3b7
Send shutdown signal to shutdown open connections
...
Normally all dangling goroutines are terminated when the main function
exits. However, for projects that use a patched version of snowflake as
a library, these goroutines continued running as long as the main function
had not yet terminated. This commit has all open SOCKS connections close
after receiving a shutdown signal.
2020-12-05 15:50:16 -05:00
Cecylia Bocovich
cc55481faf
Set max number of snowflakes in the Tongue
2020-08-27 16:44:07 -04:00
Cecylia Bocovich
1364d7d45b
Move snowflake ConnectLoop inside SOCKS Handler
...
Bug #21314 : maintains a separate snowflake connect loop per SOCKS
connection. This way, if Tor decides to stop using Snowflake, Snowflake
will stop using the client's network.
2020-08-27 16:43:55 -04:00
Cecylia Bocovich
82031289a3
Refactor subsetting of ice servers into main
...
This moves the subsetting of ice servers out of the parseIceServers
function and into main.
2020-07-24 14:08:09 -04:00
Cecylia Bocovich
92520f681d
Choose a random subset from given STUN servers
...
Only chooses a subset as long as we have over 2 STUN servers to choose
from.
2020-07-23 11:30:36 -04:00
Cecylia Bocovich
bf924445e3
Implement NAT discovery (RFC 5780) at the client
...
Snowflake clients will now attempt NAT discovery using the provided STUN
servers and report their NAT type to the Snowflake broker for matching.
The three possibilities for NAT types are:
- unknown (the client was unable to determine their NAT type),
- restricted (the client has a restrictive NAT and can only be paired
with unrestricted NATs)
- unrestricted (the client can be paired with any other NAT).
2020-07-06 13:16:03 -04:00
David Fifield
2853fc9362
Make BytesSyncLogger's implementation details internal.
...
Provide NewBytesSyncLogger that returns an opaque data structure.
Automatically start up the logging loop goroutine in NewBytesSyncLogger.
2020-04-23 21:38:44 -06:00
David Fifield
ee2fb42d33
Immediately and unconditionally grant new SOCKS connections.
2020-04-23 14:00:03 -06:00
Arlo Breault
5fa7578655
Rename logToStateDir/keepLocalAddresses to kebab case
...
https://en.wikipedia.org/wiki/Letter_case#Special_case_styles
2020-03-25 11:53:24 -04:00
Arlo Breault
f58c865d82
Add unsafe logging
2020-03-25 11:53:24 -04:00
Cecylia Bocovich
920f6791f3
Add a go.mod and go.sum for snowflake
2020-03-05 09:21:17 -05:00
Arlo Breault
0fae4ee8ea
Remove local LAN address ICE candidates
...
Unfortunately, the "public" RTCIceTransportPolicy was removed.
https://developer.mozilla.org/en-US/docs/Web/API/RTCConfiguration#RTCIceTransportPolicy_enum
Trac: 19026
2020-02-08 10:13:40 -05:00
David Fifield
a2292ce35b
Make timeout constants into time.Duration values.
...
This slightly changes some log messages.
2020-01-31 00:08:50 -07:00
David Fifield
dfb83c6606
Allow handling multiple SOCKS connections simultaneously.
...
Close the SOCKS connection in the same function that opens it.
2020-01-30 10:18:23 -07:00