Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:25:02Zhttps://gitlab.torproject.org/legacy/trac/-/issues/25950Run "accounting_run_housekeeping" with a periodic event.2020-06-13T15:25:02ZNick MathewsonRun "accounting_run_housekeeping" with a periodic event.Here's an implementation sketch:
* Make accounting_add_bytes() check whether limits are exceeded. Refactor the code as needed to make this check fast.
* If a limit is exceeded, schedule consider_hibernation().
* Also schedule consi...Here's an implementation sketch:
* Make accounting_add_bytes() check whether limits are exceeded. Refactor the code as needed to make this check fast.
* If a limit is exceeded, schedule consider_hibernation().
* Also schedule consider_hibernation() again based on "shutdown_time", "hibernate_end_time", and "interval_wakeup_time".
* Pull "accounting_run_housekeeping" apart:
* Other logic to set interval_end_time if it isn't set but accounting is enabled.
* A periodic event, only scheduled when network is on and accounting is enabled, to record bandwidth usage. Tie this into the or_state_save event.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/25752Detangle our included headers and reduce reliance on or.h2020-06-13T15:24:15ZIsis LovecruftDetangle our included headers and reduce reliance on or.hOver the years, our code has grown to have a lot of `#include`s which are no longer necessary, and others which are over the scope of what actually needs to be included. A prime example of this is that nearly everything in `/src/or` incl...Over the years, our code has grown to have a lot of `#include`s which are no longer necessary, and others which are over the scope of what actually needs to be included. A prime example of this is that nearly everything in `/src/or` includes `or.h` which is a huge, insanely long header file with nearly every type we've ever made. It'd be nice if we could decouple things a bit more.
I made brief foray into playing with automated tools for doing this last week. First I tried https://github.com/myint/cppclean, but it wasn't able to process any of our code without displaying a python traceback, so I moved on to https://include-what-you-use.org/. iwyu worked a bit better, but it really wanted to change system headers and remove the defined safeguards (e.g. `#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif`), which feels super scary and I'm pretty sure will result in a lot of weird breakage, particularly on systems of lower tier support status and systems developers tend to not use (e.g. win32). There's a bunch of pragmas (https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md) we could probably use to tell it to leave alone the system headers (e.g. `find src -iname "*.[ch]" -exec sed -i -e 's/#include <*>/#include <*> \/\/ IYWU pragma: keep/' {} \;` or something).
It also wanted to do things like removing an `#include or.h` and then including from that only the system headers that were used, so maybe it's also a good idea to split up `or.h`? Like we could put the system headers and compatibility stuff at the top into a `prelude.h` or something that every module includes, and then more specific stuff in other header files. It might be nice to map out or graph which sections of code tend to need to use the same headers, in order to facilitate the organisation of splitting up `or.h`.
I have a `feature/iwyu-test` [branch](https://github.com/isislovecruft/tor/tree/feature/iwyu-test) where I committed the changes that iwyu made, plus some manual fixups that I made as I was perusing the changes (sorry, I should have kept those separate probably). I had to basically discard all changes to the ref10 ed25519 implementation, because it didn't understand why there were `#include`s mid-C-function. Also it wanted to `#include <bits/socket_type.h>` in several places, which had to be replaced with `#include <sys/socket.h>` instead, no idea why it wanted the private header in the first place (also if it did, why it didn't also `#define _SYS_SOCKET_H`). The output of `configure --disable-asciidoc && make -k CC=/home/isis/code/sources/iwyu/build/include-what-you-use 2>/tmp/iwyu.out` is ~~attached~~ [here](https://people.torproject.org/~isis/docs/2018-04-09-bug25752-iwyu-output.txt). Also I compiled iwyu against LLVM/clang 3.5.Tor: 0.3.5.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/25595Test suite for Snowflake on various NAT topologies2020-06-13T18:18:54ZArlo BreaultTest suite for Snowflake on various NAT topologiesMigrated from https://github.com/keroserene/snowflake/issues/20Migrated from https://github.com/keroserene/snowflake/issues/20https://gitlab.torproject.org/legacy/trac/-/issues/25430Turkey bridges.torproject.org cant access2020-06-13T18:29:10ZTracTurkey bridges.torproject.org cant accessGreetings,
In Turkey as you know there are lots of internet censorship and im fearing that this censorship could go way much worse just like russia and china.
About 2-3 years ago Turkey government blocked tor, by that i mean tor relays...Greetings,
In Turkey as you know there are lots of internet censorship and im fearing that this censorship could go way much worse just like russia and china.
About 2-3 years ago Turkey government blocked tor, by that i mean tor relays and torproject.org website.
So im trying to get along with it by using bridges.
The problem is, both torproject.org and its subdomain bridges.torproject.org is censored as well-in all Turkey's ISP's. Currently i can only access via vpn-but also in tails its really hard to access bridges as well.(one time i had to manually input bridges plus certs doh!)
My search on mirrors of bridges.torproject.org gave no results, and i cant find any problem solving answers here as well unfortunately.
And yes there are other ways to get bridges by mail, but those mail adresses-gmail,yahoo and riseup could be censored as well. So we need a solution about that too.
So my problem/ suggestion is to put a mirror site-other than torproject.org on your web page,and maybe put some sync'ing bridges in tails ( i mean with a script, bridges info could be pulled -from clearnet :( i know right-and put in torrc file)
Sorry i dont have enough tech info about this,im just throwing the ideas i have.
This censorship of ours could be gotten worse-in anytime so please help us!
**Trac**:
**Username**: fromturkeyhttps://gitlab.torproject.org/legacy/trac/-/issues/25227Avoid storing all Tor nodes in RAM2020-06-13T15:21:57ZteorAvoid storing all Tor nodes in RAM```
<teor4> ahf: I've been thinking about reducing Tor's RAM usage by sampling from each consensus, rather than keeping it all in RAM
<teor4> there are ways to stream the consensus, pick a weighted sample, and just keep those nodes
<teor...```
<teor4> ahf: I've been thinking about reducing Tor's RAM usage by sampling from each consensus, rather than keeping it all in RAM
<teor4> there are ways to stream the consensus, pick a weighted sample, and just keep those nodes
<teor4> https://en.wikipedia.org/wiki/Reservoir_sampling
<teor4> it would really help the iOS VPN, and other embedded impls
<teor4> The catch is that if you run out of sampled nodes, you need to re-parse the consensus
<+ahf> teor4: i had been thinking a bit in the back of my head if we could refactor the code that is used for accessing the consensus to be a bit more pluggable to experiment with different ways of backing them
<+ahf> teor4: on ios i think we can mmap() files without them adding to the memory limit of the application too
<teor4> that would be helpful, because we could only keep the selected node queues in RAM
<teor4> if we got the queue size right, we could regenerate them once per consensus
<+ahf> do you want to create a ticket with this? maybe add sponsor8-can to the keywords
```
We could be smart about node selection, and just store some weights for each node. And then when we use too much RAM for nodes, we could evict older nodes.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/25153Specify how PrivCount in Tor statistics are configured and interpreted2020-06-13T15:21:41ZteorSpecify how PrivCount in Tor statistics are configured and interpretedIn ~~prop#280~~ prop#288, we specified the counters, noise, and secure aggregation for PrivCount in Tor.
Now we need to specify:
* how long each collection round goes for
* how we determine which counters are collected
* how we configur...In ~~prop#280~~ prop#288, we specified the counters, noise, and secure aggregation for PrivCount in Tor.
Now we need to specify:
* how long each collection round goes for
* how we determine which counters are collected
* how we configure the amount of noise for each counter
* how Metrics can interpret the final results
We should also try to answer the unanswered questions in prop280.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/25021Update Tor Browser spec for 9.02020-06-16T01:26:57ZGeorg KoppenUpdate Tor Browser spec for 9.0Tor Browser 7.5 is out. We should update our design document to cover all the new issues that are showing up in it. Highlights are
1) Switch to rbm/tor-browser-build
2) The security slider copy update
...
Additionally, we should fold i...Tor Browser 7.5 is out. We should update our design document to cover all the new issues that are showing up in it. Highlights are
1) Switch to rbm/tor-browser-build
2) The security slider copy update
...
Additionally, we should fold in all the 8.0, 8.5, and 9.0 changes.Georg KoppenGeorg Koppenhttps://gitlab.torproject.org/legacy/trac/-/issues/24607CAPTCHAs on BridgeDB seem to be getting more difficult2020-06-13T18:29:07ZAlison MacrinaCAPTCHAs on BridgeDB seem to be getting more difficultI just tried to solve 12 CAPTCHAs unsuccessfully before I got to one that worked. In each, at least one or two characters was impossible to discern.I just tried to solve 12 CAPTCHAs unsuccessfully before I got to one that worked. In each, at least one or two characters was impossible to discern.Philipp Winterphw@torproject.orgPhilipp Winterphw@torproject.orghttps://gitlab.torproject.org/legacy/trac/-/issues/23858Create a local tool that provides detailed statistics for relay operators2020-06-13T15:15:51ZteorCreate a local tool that provides detailed statistics for relay operatorsWe want to reduce relay stats to 24 hours, and maybe eventually a month.
Maybe we could use nyx or local Atlas-like graphs for this.We want to reduce relay stats to 24 hours, and maybe eventually a month.
Maybe we could use nyx or local Atlas-like graphs for this.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/22798Windows relay is several times slower than Linux relay2020-06-13T15:13:25ZTracWindows relay is several times slower than Linux relayI have launched two relays: first one in native mode on Windows, second one in virtual machine on Linux.
Then measured their bandwidth using three-hop circuit: refEntry, myRelay, refExit
refEntry is [[https://atlas.torproject.org/#detai...I have launched two relays: first one in native mode on Windows, second one in virtual machine on Linux.
Then measured their bandwidth using three-hop circuit: refEntry, myRelay, refExit
refEntry is [[https://atlas.torproject.org/#details/13B2354C74CCE29815B4E1F692F2F0E86C7F13DD|13B2354C74CCE29815B4E1F692F2F0E86C7F13DD]]
refExit is [[https://atlas.torproject.org/#details/07C05ED4825F51D5BE4CDBBAA80BFA484132A2F5|07C05ED4825F51D5BE4CDBBAA80BFA484132A2F5]]
Windows version of Tor was able to provide 51 KiB/s.
Linux version - 163 KiB/s, which is three times higher.
But this was my measurements.
BwAuth ratings for this relays are far more different:
Windows one have weight = 18 (19/13/22/18).
Linux one got weight = 1030 (293/1030/1460).
Which leads to actual traffic rising from 1 KiB/s to ~500 KiB/s.
I can keep relay in virtual machine for a while, but it would be much better if Windows version gets fixed.
Here are the versions of software used in tests:
OS: Windows 7 SP1 x64 (host)
OS: Ubuntu 16.04 x64 (guest)
VM: VirtualBox 5.1.22
Tor: 0.2.9.11 (Linux)
Tor: 0.2.9.11, 0.3.0.8 (Windows)
Also I have obtained TCP packets dump from relay's network interface:
(REDACTED)
Packets 1-1584 are slow transfer (Windows relay).
Packets 1585-8659 are fast transfer (Linux VM relay).
I can made additional tests and provide additional information if needed.
**Trac**:
**Username**: VortTor: 0.2.9.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/22777Implement a backend HTTP server for Hyphae's credentials2020-06-13T18:28:48ZIsis LovecruftImplement a backend HTTP server for Hyphae's credentialsWe'll need an HTTP server which implements Appendix B of [the Hyphae paper](https://patternsinthevoid.net/hyphae/hyphae.pdf).We'll need an HTTP server which implements Appendix B of [the Hyphae paper](https://patternsinthevoid.net/hyphae/hyphae.pdf).https://gitlab.torproject.org/legacy/trac/-/issues/22741Make a tool that sends bandwidth to relays stuck with low measurements2020-06-13T16:19:44ZteorMake a tool that sends bandwidth to relays stuck with low measurementsSome relays get stuck in a low bandwidth authority bucket, and never get out. And their self-measurement isn't enough to unstick them (#22453).
So we want a tool that sends traffic through relays with low consensus weight, ideally enoug...Some relays get stuck in a low bandwidth authority bucket, and never get out. And their self-measurement isn't enough to unstick them (#22453).
So we want a tool that sends traffic through relays with low consensus weight, ideally enough to guarantee them the Fast flag (at which point, the client bandwidth allocation and network measurement take over).
It would be nice to just send drop cells.
But I think we can do this using stem and tor and some URL downloading library.
Sticking this in "Torflow" because that's where it might end up.
But maybe it would be better in its own component eventually.https://gitlab.torproject.org/legacy/trac/-/issues/22498Offline directory authorities need a way to post their certificate to other a...2020-06-13T15:10:01ZteorOffline directory authorities need a way to post their certificate to other authoritiesWe have wanted to be able to run (the signing parts of) a directory authority offline for a while, because it's more secure.
So I have been experimenting with an offline (ORPort and DirPort unreachable) directory authority on the test n...We have wanted to be able to run (the signing parts of) a directory authority offline for a while, because it's more secure.
So I have been experimenting with an offline (ORPort and DirPort unreachable) directory authority on the test net.
Almost everything works: it posts votes, downloads votes from other authorities, signs consensuses, and posts its signature. It could easily do these things using a 3-hop Tor path.
But once its authority certificate expires, it has no way to post it to the other authorities.
A workaround is to overwrite another authority's cached-certs file with the missing authority certificate file. But this is nasty.
We should make authorities accept certificate posts, and post their certificates to one another.Tor: very long termhttps://gitlab.torproject.org/legacy/trac/-/issues/22408Refactor functions over 300 lines long.2020-06-13T15:09:35ZNick MathewsonRefactor functions over 300 lines long.I think it's reasonable to impose a much smaller limit, but let's start by attacking the worst offenders. cc'ing catalyst because we've talked about this before.
It's probably a good idea to use a separate ticket or separate branch for...I think it's reasonable to impose a much smaller limit, but let's start by attacking the worst offenders. cc'ing catalyst because we've talked about this before.
It's probably a good idea to use a separate ticket or separate branch for each one.
```
300 connection_listener_new
306 networkstatus_set_current_consensus
327 rend_service_receive_introduction
330 ed_key_init_from_file
332 circuit_get_open_circ_or_launch
355 tor_spawn_background
360 router_dump_router_to_string
389 networkstatus_verify_bw_weights
389 parse_socks
399 connection_edge_process_relay_cell
404 circuit_expire_building
449 parse_port_config
535 options_act
541 connection_ap_handshake_rewrite_and_attach
548 router_parse_entry_from_string
638 networkstatus_parse_vote_from_string
973 networkstatus_compute_consensus
1269 options_validate
```Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/22407Support HTTP CONNECT tunnels as an alternative to SOCKS2020-06-13T15:09:35ZNick MathewsonSupport HTTP CONNECT tunnels as an alternative to SOCKS_Note:_ This is NOT a ticket about adding a caching or rewriting or privacy-enhancing HTTP proxy to Tor.
We may want to support the "HTTP CONNECT" command as an alternative to SOCKS, since a fair number of applications support the form..._Note:_ This is NOT a ticket about adding a caching or rewriting or privacy-enhancing HTTP proxy to Tor.
We may want to support the "HTTP CONNECT" command as an alternative to SOCKS, since a fair number of applications support the former but not the latter. For the current definition of HTTP CONNECT, see [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6).
Our existing HTTP parsing code should be sufficient to handle these requests, though we would want to make sure we got the semantics right.
The flexibility of HTTP could make this an alternative to proposal 229.Tor: 0.3.2.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/21358Tor fails to reconnect after computer resumes from sleep2020-06-13T15:05:51Zweasel (Peter Palfrader)Tor fails to reconnect after computer resumes from sleepA user reports that tor 0.2.9.x does not work after resumes, similar (or the same as) bug #19969, marked already fixed.
https://bugs.debian.org/853146:
> Tor (or tor with little t) doesn't reconnect automatically to Tor
> network after...A user reports that tor 0.2.9.x does not work after resumes, similar (or the same as) bug #19969, marked already fixed.
https://bugs.debian.org/853146:
> Tor (or tor with little t) doesn't reconnect automatically to Tor
> network after I resume my computer from sleep. So instead I have to
> run "sudo systemctl restart tor" to get it working again. Though, I
> think it reconnects automatically after several minutes of computer
> being on but I would like it to reconnect immediately after the
> computer has resumed from sleep.
>
> I'm not sure if tor uses systemd but so if it uses maybe there is some
> 'resume sleep' hook in systemd that could be used for tor to
> reconnect. Please let me know if you think such change would cause
> some other problems.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/21179Add a fuzzing harness for the tor OR protocol2020-06-13T15:05:18ZteorAdd a fuzzing harness for the tor OR protocolTor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/19881New guard plan - guard selection for circuits2020-06-13T15:00:05ZAndrea ShepardNew guard plan - guard selection for circuitsNew guard plan summarized at https://lists.torproject.org/pipermail/tor-dev/2016-July/011234.html
5) Selecting guards for circuits
- Meant to replace choose_random_entry_impl()
- See section SELECTING in prop271
- Add new circuit sta...New guard plan summarized at https://lists.torproject.org/pipermail/tor-dev/2016-July/011234.html
5) Selecting guards for circuits
- Meant to replace choose_random_entry_impl()
- See section SELECTING in prop271
- Add new circuit states to or_circuit_t
- Implement the guard selection logic
- Unittests on circuit state machine
- Unittests on guard selection logicTor: 0.3.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/19377Consider retry/backoff behavior when building new circuits2020-06-13T14:58:36ZAndrea ShepardConsider retry/backoff behavior when building new circuitsRetrying connections is the wrong level of abstraction at which to think about circuit failure behavior IMO (see comment on #15942); we should consider whether, as a client or an HS, we're ever doing anything like repeatedly retrying to ...Retrying connections is the wrong level of abstraction at which to think about circuit failure behavior IMO (see comment on #15942); we should consider whether, as a client or an HS, we're ever doing anything like repeatedly retrying to build a circuit without smart backoff behavior for the sake of DoS resistance though.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/19327controller: expose fine-grained circuit detail.2020-06-13T14:58:32ZNick Mathewsoncontroller: expose fine-grained circuit detail.circuits have lots of fields on them, and not all are currently exposed via getinfo. For testing, it might be useful to list more.circuits have lots of fields on them, and not all are currently exposed via getinfo. For testing, it might be useful to list more.Tor: unspecified