Commit graph

1016 commits

Author SHA1 Message Date
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
Shelikhoo
6cb82618a0
Refactor WebRTC Peer,Dialer's name to be readable
See also:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/67#note_2771666
2022-01-25 12:49:59 +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
55bf117d1a
Reduce PT Event Logger Verbosity 2022-01-25 12:49:59 +00:00
Shelikhoo
7536dd6fb7
Add Propagate EventLogger Setting 2022-01-25 12:49:59 +00:00
Shelikhoo
8d2f662c8c
Emit non-pointer type event 2022-01-25 12:49:58 +00:00
Shelikhoo
128936c825
Enable PT Event Logger 2022-01-25 12:49:58 +00:00
Shelikhoo
ac64d17705
Add PT Event Logger 2022-01-25 12:49:58 +00:00
Shelikhoo
36ca610d6b
Add NewWebRTCPeer3E Initializer
This name includes [E]vent to reduce merge conflict with forward proxy change set.
2022-01-25 12:49:58 +00:00
Shelikhoo
9a7fcdec03
Add Snowflake Event Reporter for Peer Communication 2022-01-25 12:49:57 +00:00
Shelikhoo
c3f09994da
Add Snowflake Event Reporter for Broker Communication 2022-01-25 12:49:57 +00:00
Shelikhoo
cd6d837d85
Add snowflake event handler to client config 2022-01-25 12:49:57 +00:00
Shelikhoo
b5ef18803f
Add Event Bus Test 2022-01-25 12:49:57 +00:00
Shelikhoo
5f03f88d73
Add Event Bus Implementation
This event bus implementation favours simplicity over efficiency and is not suitable for frequent addition and removal of listeners.
2022-01-25 12:49:56 +00:00
Shelikhoo
75f770150d
Add Snowflake Event API interface 2022-01-25 12:49:51 +00:00
Shelikhoo
d2f6ea5417
increase clientIDAddrMapCapacity
See also:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40084
2022-01-18 14:33:34 -05:00
Shelikhoo
50646698e3
Suppress connection end log output
This is an amendment of https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/30
2022-01-18 14:33:27 -05:00
Cecylia Bocovich
b35a79ac24
Validate client and proxy supplied strings
Malicious clients and proxies can provide potentially malicious strings
in the polls. This validates the NAT type and proxy type strings to
ensure that malformed strings are not displayed on a web page
or passed to any of our monitoring infrastructure.

If a client or proxy supplies an invalid NAT type, we return an error
message. If a proxy supplies an unknown proxy type, we set the proxy
type to unknown.
2022-01-12 11:30:41 -05:00
David Fifield
aeb0794d28 Use require rather than replace for dtls version.
go mod edit -dropreplace=github.com/pion/dtls/v2
go get github.com/pion/dtls/v2@v2.0.12

This is an update to
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/66.
2021-12-16 09:46:55 -07:00
Cecylia Bocovich
9c11e479d0
Update go versions in CI tests
Debian packages Go 1.15 and 1.17, and we use 1.16 in Tor Browser.
2021-12-10 10:43:47 -05:00
Cecylia Bocovich
738bd464ea
Update version of DTLS library
Make sure we use a version of the DTLS library that contains the
following fingerprinting fixes:

Only send supported_groups extension in ClientHello
Do not include IP addresses as SNI values

These changes have been merged upstream into pion/dtls.
2021-12-10 10:39:44 -05:00
Hans-Christoph Steiner
221f1c41c9
gitlab-ci: include job number in the artfacts zipball filename 2021-12-01 11:48:08 +01:00
Hans-Christoph Steiner
51f2c026fd
gitlab-ci: include flags to make reproducible builds
* https://github.com/golang/go/issues/33772
2021-12-01 11:48:06 +01:00
Hans-Christoph Steiner
1318b6a9ec
stripped down Android build process for gitlab-ci and Vagrant 2021-12-01 11:48:03 +01:00
Hans-Christoph Steiner
c9399da566
gitlab-ci: expire artifacts in 1 week, improve gradle caching, etc. 2021-12-01 11:09:57 +01:00
Shelikhoo
40f44d6272
Add V2Ray/V2Fly License for task 2021-11-19 15:55:30 +00:00
Shelikhoo
0c62d806a4
Represent NATTypeMeasurementInterval in time.Duration
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2761566
2021-11-16 19:25:27 +00:00
Shelikhoo
c49f72eb0c
Update nat-retest-interval type to duration
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2761438
2021-11-16 15:58:57 +00:00
Shelikhoo
efdb850d2e
Update nat-retest-interval flag name to reflect the change
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2761382
2021-11-16 11:22:44 +00:00
Shelikhoo
9bdb87eaf3
Update nat-retest-seconds format to time.ParseDuration form
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2761382
2021-11-16 11:20:27 +00:00
Shelikhoo
d4fdb35ee8
Add in source indicator of file origin
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2759815
2021-11-12 10:56:57 +00:00
Shelikhoo
1b79962ca8
Rename flag to nat-retest-seconds and retest daily by default
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2759816

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2760512
2021-11-12 10:49:32 +00:00
Shelikhoo
59af9927a5
Refactor state transfer logic to simplify it
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2760514
2021-11-12 10:49:32 +00:00
Shelikhoo
2547883cf9
Extract function getCurrentNATType()
Adopted the change in according to the recommendation from

https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/62#note_2759900
2021-11-12 10:49:32 +00:00
Shelikhoo
a6a53ff8ce
Add NAT Type test periodic task 2021-11-12 10:49:30 +00:00
Shelikhoo
ac97ce7136
Add NAT Type measurement command line flag
It is important to include unit in flag name to prevent user from making mistake.
2021-11-12 10:48:15 +00:00
Shelikhoo
4c8a166178
Port V2Ray periodic task standard library to snowflake
This is a mature implementation of periodic task that run a function at given interval. It allows task to be stopped, and deals with edge case like interval too short gracefully.

V2Ray/V2Fly is MIT licensed.
2021-11-12 10:48:14 +00:00
Shelikhoo
04bc471a63
Support recurring NAT Type measurement
currentNATType will from now on be guarded by currentNATTypeAccess for any access.

NAT Type update rule is flattened into state transfer lookup table to assist reading.
2021-11-12 10:48:14 +00:00
Cecylia Bocovich
ead5a960d7
Bump snowflake library imports and go.mod to v2 2021-11-11 10:14:49 -05:00
Cecylia Bocovich
f6b6342a3a
Update ChangeLog for v2 release 2021-11-04 10:34:34 -04:00
Cecylia Bocovich
0a2598a1e8 Export ability to change the URL of NAT probe 2021-10-28 10:05:01 -04:00
Cecylia Bocovich
3caa83d84d Modify handling of misconfigurations and defaults 2021-10-28 10:05:01 -04:00
Cecylia Bocovich
0e8d41ba4b Update comments for exported items 2021-10-28 10:05:01 -04:00
Cecylia Bocovich
84e8a183e5 Comment package and minor changes exports 2021-10-26 15:49:46 -04:00
Cecylia Bocovich
b2edf948e2 Remove BytesLoggers from exported functions 2021-10-26 14:52:17 -04:00
idk
50e4f4fd61 Turn the proxy code into a library
Allow other go programs to easily import the snowflake proxy library and
start/stop a snowflake proxy.
2021-10-26 14:15:44 -04:00
Cecylia Bocovich
54ab79384f Unify broker/bridge domains to torproject.net 2021-10-14 11:14:22 -04:00
Cecylia Bocovich
04ba50a531 Change package name and add a package comment 2021-10-07 11:01:33 -04:00