Commit graph

990 commits

Author SHA1 Message Date
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
Cecylia Bocovich
4623c7d3e1 Add documentation where necessary for exported items 2021-10-07 11:01:33 -04:00
Cecylia Bocovich
5339ed2dd7 Stop exporting internal code 2021-10-07 11:01:33 -04:00
Cecylia Bocovich
5927c2bdf9 Default to a maximum value of 1 Snowflake peer 2021-10-04 10:17:37 -04:00
Cecylia Bocovich
6c6a2e44ab Change package name and add a package comment 2021-10-04 10:17:37 -04:00
Cecylia Bocovich
767c07dc58 Update client library usage documentation 2021-10-04 10:17:37 -04:00
Cecylia Bocovich
638ec6c222 Update Snowflake client library documentation
Follow best practices for documenting the exported pieces of the
Snowflake client library.
2021-10-04 10:17:37 -04:00
Cecylia Bocovich
99887cd05d Add package functions to define and set the rendezvous method
Add exported functions to the snowflake client library to allow calling
programs to define and set their own custom broker rendezvous methods.
2021-10-04 10:17:37 -04:00
Cecylia Bocovich
624750d5a8 Stop exporting code that should be internal 2021-10-04 10:17:37 -04:00
meskio
4396d505a3
Use tpo geoip library
Now the geoip implmentation has being moved to it's own library to be
shared between projects.
2021-10-04 12:24:55 +02:00
Cecylia Bocovich
8c6f0dbae7 Check error for calls to preparePeerConnection 2021-09-30 11:46:39 -04:00
Cecylia Bocovich
c8136f4534 Update version of go used in .gitlab-ci.yml 2021-09-10 16:57:53 -04:00
meskio
cbd863d6b1
Fix proxy test
The broker is a global object.
2021-09-02 12:49:00 +02: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
97175a91a5 Modify torrc example to pass client args in bridge line 2021-08-19 21:20:34 -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
Cecylia Bocovich
e6715cb4ee Increase smux and QueuePacketConn buffer sizes
This should increase the maximum amount of inflight data and hopefully
the performance of Snowflake, especially for clients geographically
distant from proxies and the server.
2021-08-10 15:38:11 -04:00
David Fifield
b203a75c41 Document -ampcache in snowflake-client man page. 2021-08-05 16:13:24 -06:00
David Fifield
f2dc41d778 Document /amp/client in broker-spec.txt. 2021-08-05 16:13:24 -06:00
David Fifield
521eb4d4d6 Add info about rendezvous methods to client README. 2021-08-05 16:13:24 -06:00
David Fifield
e833119bef Broker /amp/client route (AMP cache client registration). 2021-08-05 16:13:24 -06:00
David Fifield
5adb994028 Implement ampCacheRendezvous. 2021-08-05 16:13:24 -06: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
David Fifield
c9e0dd287f amp package.
This package contains a CacheURL function that modifies a URL to be
accessed through an AMP cache, and the "AMP armor" data encoding scheme
for encoding data into the AMP subset of HTML.
2021-08-05 16:13:24 -06:00
David Fifield
0f34a7778f Factor out httpRendezvous separate from BrokerChannel.
Makes BrokerChannel abstract over a rendezvousMethod. BrokerChannel
itself is responsible for keepLocalAddresses and the NAT type state, as
well as encoding and decoding client poll messages. rendezvousMethod is
only responsible for delivery of encoded messages.
2021-08-05 16:13:24 -06:00