Shelikhoo
1bc310c2e9
remove PacketPaddingContainer abstraction
2025-02-13 14:01:04 +00:00
Shelikhoo
955cbc847a
remove ReadWriteCloserPreservesBoundary from client package
2025-02-13 13:52:45 +00:00
Shelikhoo
94eddc6391
refactor message boundary constrains: coding style
2025-01-30 13:37:22 +00:00
Shelikhoo
1ba58c864d
refactor message boundary constrains
2025-01-30 13:35:36 +00:00
Shelikhoo
0aa1470e01
add connection padding on server side
2025-01-29 11:46:33 +00:00
David Fifield
c1ac2aa577
Update comment not to refer to a Stream transport.
...
Stream is not part of this branch.
2025-01-21 20:55:26 +04:00
Shelikhoo
de9fede4ac
update comment for newSession in client
2025-01-21 20:55:26 +04:00
Shelikhoo
00da3c95ed
use protocol field encoder
2025-01-21 20:55:26 +04:00
Shelikhoo
11442c8857
Remove WebRTCPeer constructor without client ID
2025-01-21 20:55:26 +04:00
Shelikhoo
c322e8b7f5
always let WebRTCDialer constructor decide the clientID
2025-01-21 20:55:26 +04:00
Shelikhoo
c7b163de57
Remove clientID from unused branch
2025-01-21 20:55:26 +04:00
Shelikhoo
1da7fecbed
fix rwcrb close
2025-01-21 20:55:26 +04:00
Shelikhoo
37f2f42ea0
revert change on SetStreamMode
2025-01-21 20:55:26 +04:00
Shelikhoo
69045b5fbb
update comment on conn.SetStreamMode
2025-01-21 20:55:26 +04:00
Shelikhoo
3a2b2fc969
add confirmation to ReadWriteCloser should preserve message boundary
2025-01-21 20:55:26 +04:00
Shelikhoo
0d9bef7794
use a propagate close for PacketConnWrapper
2025-01-21 20:55:26 +04:00
Shelikhoo
f10dc3d619
use a constructor for PacketConnWrapper
2025-01-21 20:55:26 +04:00
Shelikhoo
85b716bb40
return an error for unimplemented packetConnWrapper feature
2025-01-21 20:55:26 +04:00
David Fifield
490502691d
Remove WebRTCPeer.activeTransportMode.
...
Make "u" mode the assumed default. The WebRTC data channel protocol
contains just the hex clientID.
2025-01-21 20:55:25 +04:00
David Fifield
568a0999d2
connectionID → clientID.
2025-01-21 20:55:25 +04:00
Shelikhoo
a601c2b1fa
fix coding style issue
2025-01-21 20:55:25 +04:00
Shelikhoo
f521b180f5
add connwrapper
2025-01-21 20:55:25 +04:00
Shelikhoo
ecfd0f3f76
delete expired connection wrapper
2025-01-21 20:55:25 +04:00
Shelikhoo
c0acdd7d2a
fix pass client id to webrtc dialer
2025-01-21 20:55:25 +04:00
Shelikhoo
bf165264b1
add client side support for extra data based client id
2025-01-21 20:55:25 +04:00
Shelikhoo
ad5edd3f01
add kcp setting adjustment SNOWFLAKE_TEST_KCP_FAST3MODE
2025-01-21 20:55:25 +04:00
Shelikhoo
93d303b47b
Add testing environment helpers
2025-01-21 20:55:25 +04:00
Shelikhoo
457c4fbf15
Add UDP Like transport mode to snowflake
2025-01-21 20:55:25 +04:00
David Fifield
1895bb9d2c
Comment typo.
2025-01-13 08:49:15 +00:00
David Fifield
dbad475254
Finish incomplete comment for newEncapsulationPacketConn.
2024-12-12 06:40:57 +00:00
WofWca
94b6647d33
feat(client): try restricted proxy if NAT unknown
...
Just once, to offload unrestricted proxies.
This is useful when our STUN servers are blocked or don't support
the NAT discovery feature, or if they're just slow.
Closes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40178 .
Partially addresses https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40376
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-12-05 10:34:08 -05:00
WofWca
f6767061e4
refactor: separate some Negotiate
logic
...
As per https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/392#note_3096760
in preparation for further changes to `Negotiate`.
2024-12-05 10:27:36 -05:00
Cecylia Bocovich
75e73ce397
Fixup new STUN servers to include protocol
2024-12-04 12:02:18 -05:00
Cecylia Bocovich
cc644134ad
Added new RFC 5780 compatible STUN servers
2024-12-03 15:36:12 -05:00
Cecylia Bocovich
1607f9ce85
Remove nonfunctional STUN servers
...
Remove STUN servers that are offline, appear to be misconfigured, or do
not support NAT discovery
2024-12-03 15:21:07 -05:00
WofWca
ae5bd52821
improvement: use SetIPFilter
for local addrs
...
Closes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40271 .
Supersedes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/417 .
This simplifies the code and (probably) removes the need for
`StripLocalAddresses`, although makes us more dependent on Pion.
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-11-28 10:56:40 -05:00
Shelikhoo
239357509f
update snowflake to use pion webrtc v4
2024-11-13 14:58:53 +00:00
Renovate Bot
290be512e3
chore(deps): update module github.com/pion/webrtc/v3 to v4
2024-11-11 18:45:36 +00:00
Cecylia Bocovich
0d8bd159ec
Have SnowflakeConn.Close() return errors
...
Return an error if the connection was already closed. On the first
close, return an error if any of the calls inside Close() returned an
error in this order:
- smux.Stream.Close()
- pconn.Close()
- smux.Session.Close()
2024-10-29 14:58:01 -04:00
Cecylia Bocovich
a019fdaec9
Perform SnowflakeConn.Close() logic only once
...
Use synchronization to avoid a panic if SnowflakeConn.Close is called
more than once.
2024-10-29 14:58:01 -04:00
Neel Chauhan
8792771cdc
broker and proxy must not reject client offers with no ICE candidates
...
Fixes #40371 . Partially reverts !141 .
2024-10-17 15:46:02 -04:00
WofWca
9b04728809
docs: improve proxy CLI param descriptions
...
Since the proxy component is the most dedicated for public use,
more comprehensive docs are good.
2024-09-25 16:50:18 +01:00
WofWca
78f4b9dbc5
test(client): add test for BrokerChannel
2024-09-08 14:50:08 +04:00
David Fifield
bb2126b7c6
Use %w, not %v, in fmt.Errorf, so errors can be unwrapped.
...
https://go.dev/blog/go1.13-errors#wrapping-errors-with-w
2024-08-21 17:00:18 -04:00
meskio
6d2011ded7
Report a different implementation for client and server
2024-08-07 12:33:37 +02:00
David Fifield
ee5f815f60
Cosmetic changes from dev-snowflake-udp-rebase-extradata.
...
https://gitlab.torproject.org/shelikhoo/snowflake/-/tree/dev-snowflake-udp-rebase-extradata
commit 59b76dc68d2ee0383c2acd91cb0f44edc46af939
2024-08-01 22:12:56 +00:00
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
Cecylia Bocovich
96422e0db3
Update torrc file to match Tor Browser builtins
...
We switched to a CDN77, a cloud provider that supports domain fronting.
2024-03-24 12:41:23 -04:00
Michael Pu
9fe2ca58a0
Switch to sqscreds param for passing in SQS credentials
2024-03-09 13:35:16 -05:00