Shelikhoo
1bc310c2e9
remove PacketPaddingContainer abstraction
2025-02-13 14:01:04 +00:00
Shelikhoo
182fb83d98
reject message with 2047 bytes to reserve higher bits
2025-02-04 11:19:44 +00:00
Shelikhoo
1ba58c864d
refactor message boundary constrains
2025-01-30 13:35:36 +00:00
Shelikhoo
33b3891648
use cbor instead of json to avoid double base64
2025-01-29 13:33:18 +00:00
Shelikhoo
6e0bc74fb8
add comment for ClientConnectionMetadata
2025-01-29 13:07:50 +00:00
Shelikhoo
51eb36051c
fix coding style issue in common/message
2025-01-29 12:25:57 +00:00
Shelikhoo
0aa1470e01
add connection padding on server side
2025-01-29 11:46:33 +00:00
Shelikhoo
53172a588b
add paddable connection
2025-01-29 11:29:52 +00:00
Shelikhoo
9e45772177
rename to common/packetpadding
2025-01-29 11:22:30 +00:00
Shelikhoo
fbcb9bc863
Add packet padding container for packet length shaping: refactor arg names
2025-01-29 10:59:45 +00:00
Shelikhoo
1689279e95
Add packet padding container for packet length shaping: refactor
2025-01-29 10:59:44 +00:00
Shelikhoo
9e1cc35878
Add packet padding container for packet length shaping
2025-01-29 10:59:41 +00:00
Shelikhoo
00da3c95ed
use protocol field encoder
2025-01-21 20:55:26 +04:00
Shelikhoo
fb57ad79f5
add protocol field encoder
2025-01-21 20:55:26 +04:00
Cecylia Bocovich
eedac71a3a
Add self-signed ISRG Root X1 to cert pool
...
Replace the expired DST Root CA X3 signed ISRG Root X1 cert with the
self-signed cert.
Closes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40440
2025-01-15 10:56:17 -05:00
WofWca
5e7b35bf12
refactor: use named returns for some funcs
...
This should make the functions easier to use,
harder to confuse the return values with the same type.
2024-12-03 12:51:42 +00: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
WofWca
f65f1d850f
improvement: use IsLinkLocalUnicast in IsLocal
...
Looking at the code, this commit appears to change behavior,
because `IsLocal` will now return `true` for IPv6 link-local unicast
addresses.
2024-11-21 17:31:56 +04:00
WofWca
387096b2a1
refactor: rewrite IsLocal
with ip.IsPrivate()
...
The referenced MR has been implemented.
The extra checks have been added in 8467c01e9e
.
With this rewrite the checks are exactly the same as of Go 1.23.3.
2024-11-18 20:49:16 +04: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
8b2e12c96d
Bump version of Snowflake to 2.10.1
2024-11-11 13:15:48 -05:00
Cecylia Bocovich
aaf8826560
Add proxy event for when client has connected
...
This enables the usage of callbacks that will be called when a client
has opened a data channel connection to the proxy.
2024-11-06 10:31:33 -05:00
Waldemar Zimpel
93f5d1ef7f
Log average transfer rate
...
Adds the average transfer rate for the summary interval to the summary log lines
2024-10-23 03:25:26 +02:00
Cecylia Bocovich
443c633aab
Revert "Move time.Sleep call in turbotunnel test"
...
This reverts commit 4497d68d6f
.
2024-09-24 13:12:23 -04:00
Cecylia Bocovich
4497d68d6f
Move time.Sleep call in turbotunnel test
...
An update the the kcp-go library removes the guarantee that all data
written to a KCP connection will be flushed before the connection is
closed. Moving the sleep call has no impact on the integrity of the
tests, and gives the connection time to flush data before the connection
is closed.
See https://github.com/xtaci/kcp-go/issues/273
2024-09-23 10:08:18 -04:00
Renovate Bot
97e21e3a29
chore(deps): update module github.com/pion/stun to v3
2024-08-27 09:43:08 -04:00
Arlo Breault
ffdda1358a
Indicate modified in version string
...
issue 40365
2024-07-11 11:46:57 +01:00
itchyonion
4ed5da7f2f
Simplify proxy NAT checking logic
2024-05-28 12:30:44 -07:00
meskio
a9df5dd71a
Use ptutil for safelog and prometheus rounded metrics
...
* Related: #40354
2024-05-09 16:24:33 +02:00
Cecylia Bocovich
05a95802c1
Bump version to v2.9.2
2024-03-18 14:47:44 -04:00
meskio
f502eca67d
Merge remote-tracking branch 'origin/mr/258'
2024-03-12 08:28:53 -03:00
Michael Pu
b512e242e8
Implement better client IP per rendezvous method tracking for clients
...
Implement better client IP per rendezvous method tracking for clients
Add tests for added code, fix existing tests
chore(deps): update module github.com/miekg/dns to v1.1.58
Implement better client IP tracking for http and ampcache
Add tests for added code, fix existing tests
Implement GetCandidateAddrs from SDP
Add getting client IP for SQS
Bug fixes
Bug fix for tests
2024-03-09 13:36:25 -05:00
Michael Pu
9fe2ca58a0
Switch to sqscreds param for passing in SQS credentials
2024-03-09 13:35:16 -05:00
Cecylia Bocovich
b130151b24
Bump version to v2.9.1
2024-02-27 11:32:09 -05:00
am3o
acce1f1fd9
refactor: change deprecated "io/ioutil" package to recommended "io" package
2024-02-17 12:47:22 +01:00
Cecylia Bocovich
38352b22ad
Bump version to v2.9.0
2024-02-05 12:00:05 -05:00
Anthony Chang
dbecefa7d2
Move RendezvousMethod field to messages.Arg
2024-01-31 14:34:29 -05:00
Anthony Chang
f3b062ddb2
Add mocks and interfaces for testing SQS rendezvous
...
Co-authored-by: Michael Pu <michael.pu@uwaterloo.ca>
2024-01-22 13:10:56 -05:00
Arlo Breault
e4c818be76
Scrub space separated ip addresses
...
The issue with ReplaceAllFunc is that it's capturing the leading and
trailing spaces in the regexp, so successive ips don't match. From the
docstring,
> If 'All' is present, the routine matches successive non-overlapping
> matches of the entire expression.
For #40306
2024-01-08 10:03:35 -05:00
Arlo Breault
0d8261c46e
Add vcs revision to version string
...
For #40285
2024-01-04 00:31:08 -05:00
Cecylia Bocovich
a0e3e871c4
Bump version to v2.8.1
2023-12-21 15:54:54 -05:00
David Fifield
aa06e7bef3
Merge branch 'encapsulation-readdata-buffer'
2023-11-21 03:46:46 +00:00
Cecylia Bocovich
a88f73b0ff
Bump version to 2.8.0
2023-11-20 11:43:07 -05:00
David Fifield
d99f31d881
Have encapsulation.ReadData return an error when the buffer is short.
...
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/154#note_2919109
Still ignoring the io.ErrShortBuffer at the callers, which retains
current behavior.
2023-11-07 05:51:35 +00:00
David Fifield
001f691b47
Have encapsulation.ReadData read into a provided buffer.
...
Instead of unconditionally allocating its own.
2023-11-07 05:51:35 +00:00
Cecylia Bocovich
caa2b36463
Process and properly log connection closure stats
2023-10-31 10:02:31 -04:00
Cecylia Bocovich
5c5eb2c339
Modify EventOnProxyStats to include summary data
2023-10-30 12:42:45 -04:00
Cecylia Bocovich
354cb65432
Move creation of periodic stats task inside proxy library
...
This adds a new type of SnowflakeEvent. EventOnProxyStats is triggered
by the periodic task run at SummaryInterval and produces an event with a
proxy stats output string.
2023-10-30 12:42:45 -04:00
Shelikhoo
5df7a06eee
Add outbound proxy configuration propagation
2023-10-24 17:47:25 +01:00