Commit graph

45 commits

Author SHA1 Message Date
meskio
e345c3bac9
proxy: add country to prometheus metrics 2025-02-13 12:44:23 +01:00
WofWca
85a93c5303 docs: clarify -ports-range is for port forwarding 2024-12-13 17:06:13 +04:00
WofWca
92521b6679 improvement: warn if ports-range is too narrow
...and improve the docstring for the parameter.
2024-12-13 17:06:11 +04:00
WofWca
cb32d008ca docs: improve ephemeral-ports-range description
Clarify that the default range is wide.
2024-12-13 16:09:22 +04:00
Waldemar Zimpel
028ff82683 Optionally enable local time for logging
Introduces the option `-log-local-time` which switches to local time
for logging instead of using UTC. Also if this option is applied, a message
is being output to the log on startup about the usage of local time
to draw attention, so the user/operator can take care of anonymity in case
the logs are going to be shared.
2024-10-28 16:23:44 +01:00
Neel Chauhan
9ff205dd7f
Probetest/proxy: Set multiple comma-separated default STUN URLs
This adds the BlackBerry STUN server alongside Google's. Closes #40392.
2024-10-17 15:15: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
2bbd4d0643
refactor(proxy): better RelayURL description
It's the case that it's simply "default" after
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/87
Now the broker specifies the relay URL (see `ProxyPollResponse`).
2024-09-05 13:04:42 +01:00
WofWca
94c6089cdd
hardening(proxy): don't proxy private IP addresses
...by default.

This is useful when `RelayDomainNamePattern` is lax (e.g. just "$")
(which is not the case by default, so this is simply
a hardening measure).
2024-09-02 14:59:26 +01:00
WofWca
f4db64612c
feat: expose pollInterval in CLI
Closes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40373
2024-08-22 09:31:37 -04:00
meskio
a9df5dd71a
Use ptutil for safelog and prometheus rounded metrics
* Related: #40354
2024-05-09 16:24:33 +02:00
Sky
d439f89536 Allow to set listen address for metrics service via cl flags 2024-04-04 06:28:33 +00:00
am3o
acce1f1fd9
refactor: change deprecated "io/ioutil" package to recommended "io" package 2024-02-17 12:47:22 +01:00
Cecylia Bocovich
3939554058
Add proxy commandline option for probe server URL 2024-01-10 11:05:56 -05:00
Cecylia Bocovich
648609dbea
Refactor disabling the stats logger
Have Snowflake proxy periodically collect throughput stats even if the
stats logger is disabled so that it can be handled by the prometheus
metrics.
2023-10-31 13:15:52 -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
am3o
d932cb2744
feat: add option to expose the stats by using metrics 2023-07-28 14:23:22 +01:00
meskio
82cc0f38f7
Move the development to gitlab
Related: tpo/anti-censorship/team#86
2023-05-31 10:01:47 +02:00
itchyonion
fb35e80b0a
Proxy: add outbound-address config 2023-03-14 12:42:59 -07:00
Flo418
cebe4a0af6
enhance help for capacity flag, fix #40208 2022-12-02 13:37:17 -08:00
Shelikhoo
4ebd85e5d1
add version output to log 2022-11-23 12:29:55 +00:00
Shelikhoo
33248f3dec
Add Version Output Support to Snowflake
From now on, there will be a file at common/version/version.go that includes current version number.
2022-11-23 12:29:51 +00:00
itchyonion
9d72b30603
proxy: Let verbose level act on file logging 2022-11-16 10:08:11 -08:00
KokaKiwi
21d7449851
proxy: Check ephemeral port range ordering at flag parsing 2022-10-14 21:40:07 +02:00
KokaKiwi
10c8173120
proxy: Fix ephemeral ports range CLI flag (again) 2022-10-12 19:48:24 +02:00
KokaKiwi
986fc8269a
proxy: Correctly handle argument parsing error 2022-10-12 16:51:39 +02:00
KokaKiwi
c5b291b114
proxy: Fix build with golang 1.13 2022-10-12 16:33:09 +02:00
KokaKiwi
068af08703
Change how ephemeral-ports-range CLI flag is handled 2022-09-30 17:55:10 +02:00
KokaKiwi
47f9392645
proxy: Add ICE ephemeral ports range setting CLI flag 2022-09-30 17:55:08 +02:00
Daniel Golle
a8829d49b7
Fix proxy command line help output 2022-09-26 10:37:29 -04:00
Shelikhoo
97dea533da
Update Relay Pattern format to include dollar sign 2022-06-16 14:06:58 +01:00
Shelikhoo
ddf72025d1
Restrict Allowed Relay to Tor Pool by default 2022-06-16 14:06:58 +01:00
Shelikhoo
b09a2e09b3
Add Relay URL Check in Snowflake Proxy 2022-06-16 14:06:56 +01:00
Shelikhoo
00e8415d8e
Add verbosity switch to suppress diagnostic output 2022-02-03 13:38:48 +00:00
Shelikhoo
1116bc81c8
Add Proxy Event Logger 2022-01-25 13:03:19 +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
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
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
Cecylia Bocovich
ead5a960d7
Bump snowflake library imports and go.mod to v2 2021-11-11 10:14:49 -05:00
Cecylia Bocovich
3caa83d84d Modify handling of misconfigurations and defaults 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
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