WofWca
cb0fb02cd5
fix(proxy): not answering before client timeout
...
This is related to
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40230 .
The initial MR that closed that issue,
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/391 ,
was not semantically correct, because `DataChannelTimeout`
starts after the client has already received the answer.
After
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/498#note_3156256
the code became not only semantically incorrect,
but also functionally incorrect because now if this timeout is hit
by the proxy, the client is guaranteed to be gone already.
This commit fixes it, by lowering the timeout.
This addresses a suggestion in
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40447 .
This also closes
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40381
and supersedes
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/415 .
2025-02-12 10:17:08 -05:00
Cecylia Bocovich
4a1e075ee0
Lower broker ClientTimeout to 5 seconds
...
Matches the observed timeout for CDN77, based on user reports.
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40446
2025-02-04 15:41:35 -05: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
71828580bb
fix(broker): empty pattern if bridge-list is empty
...
i.e. if no bridge list file is provided, the relay pattern
would not get set.
AFAIK this is not a breaking change because the broker
can't be used as a library, unlike client and server.
2024-09-21 15:11:37 +00:00
WofWca
ec9476e5ab
Better error msg on bad fingerprint
2024-09-04 10:47:08 -04:00
meskio
0804d8651f
Merge remote-tracking branch 'gitlab/mr/362'
2024-08-22 13:35:53 +02:00
WofWca
677146c9d5
add test_bridgeList.txt
file
...
As an example for the `bridge-list-path` parameter
2024-08-21 20:50:59 +04:00
WofWca
103278d6fa
docs(broker): clarify allowed-relay-pattern
...
Specify that the broker will reject proxies
whose AcceptedRelayPattern is more restrictive than this,
and not less restrictive.
The parameter was introduced here
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/87
> The proxy sends its allowed URL pattern to the broker.
> The broker rejects proxies that are too restrictive.
2024-08-20 12:43:31 +01:00
meskio
f64f234eeb
New ptuitl/safeprom doesn't have Rounded in the type names
...
This version fixes the test issue of double registering metrics.
* Closes : #40367
2024-07-11 17:45:57 +02:00
meskio
a9df5dd71a
Use ptutil for safelog and prometheus rounded metrics
...
* Related: #40354
2024-05-09 16:24:33 +02: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
am3o
acce1f1fd9
refactor: change deprecated "io/ioutil" package to recommended "io" package
2024-02-17 12:47:22 +01:00
Michael Pu
5f5cbe6431
Prune metrics that are reported for rendezvous
...
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-01-31 14:34:32 -05:00
Anthony Chang
dbecefa7d2
Move RendezvousMethod field to messages.Arg
2024-01-31 14:34:29 -05:00
Michael Pu
26ceb6e20d
Add metrics for tracking rendezvous method
...
Update tests for metrics
Add rendezvous_method to Prometheus metrics
Update broker spec docs with rendezvous method metrics
Bug fix
2024-01-31 14:34:29 -05:00
Michael Pu
b8df42a377
Fix nil ptr deference when listing client queues
...
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-01-31 12:50:50 -05: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
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
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
meskio
778e3af09a
Merge remote-tracking branch 'gitlab/mr/187'
2023-10-26 18:47:01 +02: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
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
Cecylia Bocovich
3a050c6bb3
Use ShouldBeNil to check for nil values
2023-09-20 12:34:51 -04: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
Shelikhoo
36f03dfd44
Record proxy type for proxy relay stats
2022-09-23 13:08:13 +01:00
itchyonion
03b2b56f87
Fix broker race condition
2022-07-19 18:25:27 -07:00
Shelikhoo
2541b13166
Add distinct IP counter to broker
2022-06-16 15:00:10 +01:00
Shelikhoo
fa7d1e2bb7
Add distinct IP counter to metrics
2022-06-16 14:58:12 +01:00
Shelikhoo
a4bbb728e6
Fix not zero metrics for 1.3 values
2022-06-16 14:06:58 +01:00
Shelikhoo
8ba89179f1
Add document for LoadBridgeInfo input
2022-06-16 14:06:58 +01:00
Shelikhoo
8ab45651d0
Disallow unknown bridge list file field
2022-06-16 14:06:58 +01:00
Shelikhoo
f789dce6d2
Represent Bridge Fingerprint As String
2022-06-16 14:06:58 +01:00
Shelikhoo
dd61e2be0f
Add Proxy Relay URL Metrics Collection
2022-06-16 14:06:57 +01:00
Shelikhoo
b78eb74e42
Add Proxy Relay URL Rejection Metrics
2022-06-16 14:06:57 +01:00
Shelikhoo
7caab01785
Fixed desynchronized comment and behavior for log interval
...
In 64ce7dff1b
, the log interval is modified while the comment is left unchanged.
2022-06-16 14:06:57 +01:00
Shelikhoo
b391d98679
Add Proxy Relay URL Support Counting Metrics Output
2022-06-16 14:06:57 +01:00
Shelikhoo
6e8fbe54ee
Rejection reason feedback
2022-06-16 14:06:57 +01:00
Shelikhoo
b18a9431b2
Add Broker Allowed Relay Pattern Indication Rejection for Proxy
2022-06-16 14:06:57 +01:00
Shelikhoo
2ebdc89c42
Add Allowed Relay Hostname Pattern Indication
2022-06-16 14:06:57 +01:00
Shelikhoo
02c6f764c9
Add support for specifying bridge list file
2022-06-16 14:06:56 +01:00
Shelikhoo
50c0d64e10
Add Detailed Error Output for proxyPolls, proxyAnswers
2022-06-16 14:06:56 +01:00
Shelikhoo
c7549d886e
Update default snowflake server address
...
Change snowflake broker test for updated address
Amend DefaultBridges Value
Add Default Fingerprint Info for Snowflake
2022-06-16 14:06:56 +01:00
Shelikhoo
5d7a3766d6
Add Relay Info Forwarding for Snowflake
2022-06-16 13:57:34 +01:00
Shelikhoo
5578b4dd76
Add Bridge List Holder Test
2022-06-16 13:57:00 +01:00
Shelikhoo
0822c5f87b
Add Bridge List Holder
2022-06-16 13:56:59 +01:00
Shelikhoo
3d4f294241
Add Bridge List Definition
2022-06-16 13:56:56 +01:00