Last active
December 5, 2025 04:38
-
-
Save paigeadelethompson/74206cf0c482922a7e4fb28100e26e27 to your computer and use it in GitHub Desktop.
torrc modified for throughput / high connection volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Do Not: | |
| # change NumCPUs to > 1 (default is 0 meaning it will auto detect) | |
| # However this configuration causes data structure modification that | |
| # is not thread safe. | |
| # | |
| RunAsDaemon 0 | |
| Log notice stdout | |
| OutboundBindAddress 2001:470:b:56f:: | |
| HTTPTunnelPort [2001:470:b:56f::]:8080 NoOnionTraffic | |
| SOCKSPort [2001:470:b:56f::]:1080 NoOnionTraffic | |
| SOCKSPolicy accept6 fc00::/7 | |
| SOCKSPolicy accept6 2001:470:b:56f::/128 | |
| SOCKSPolicy accept6 2001:470:e845::3128/128 | |
| SOCKSPolicy reject * | |
| MainloopStats 1 | |
| ClientRejectInternalAddresses 1 | |
| ClientDNSRejectInternalAddresses 1 | |
| ClientPreferIPv6ORPort 1 | |
| ClientUseIPv4 0 | |
| ClientUseIPv6 1 | |
| ClientOnly 1 | |
| AvoidDiskWrites 1 | |
| LongLivedPorts 80,443 | |
| CircuitBuildTimeout 4 | |
| SocksTimeout 16 | |
| StrictNodes 1 | |
| CircuitPriorityHalflife 16.000000 | |
| DownloadExtraInfo 1 | |
| ConstrainedSockSize 16384 | |
| DirReqStatistics 0 | |
| FetchDirInfoEarly 1 | |
| FetchDirInfoExtraEarly 1 | |
| FetchUselessDescriptors 1 | |
| KeepalivePeriod 60 | |
| MaxCircuitDirtiness 1600 | |
| MaxClientCircuitsPending 128 | |
| NumDirectoryGuards 32 | |
| NumEntryGuards 128 | |
| TokenBucketRefillInterval 1000 | |
| UseMicrodescriptors 1 | |
| NumCPUs 1 |
Author
Author
Other problems (HTTP CONNECT proxying is hated by Tor, probably won't even be available in the stupid rust implementation.) Necessary because most things that support HTTP_PROXY and HTTPS_PROXY don't/never will support SOCKS.
diff --git a/src/core/or/reasons.c b/src/core/or/reasons.c
index d646a59..28df098 100644
--- a/src/core/or/reasons.c
+++ b/src/core/or/reasons.c
@@ -495,7 +495,6 @@ end_reason_to_http_connect_response_line(int endreason)
return "HTTP/1.0 403 Forbidden (entry policy violation)\r\n";
case END_STREAM_REASON_NOTDIRECTORY: FALLTHROUGH;
default:
- tor_assert_nonfatal_unreached();
return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n";
}
}
Author
diff --git a/src/core/or/reasons.c b/src/core/or/reasons.c
index d646a59..28df098 100644
--- a/src/core/or/reasons.c
+++ b/src/core/or/reasons.c
@@ -495,7 +495,6 @@ end_reason_to_http_connect_response_line(int endreason)
return "HTTP/1.0 403 Forbidden (entry policy violation)\r\n";
case END_STREAM_REASON_NOTDIRECTORY: FALLTHROUGH;
default:
- tor_assert_nonfatal_unreached();
return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n";
}
}
diff --git a/src/lib/smartlist_core/smartlist_core.c b/src/lib/smartlist_core/smartlist_core.c
index f0c1f8a..c7be1d0 100644
--- a/src/lib/smartlist_core/smartlist_core.c
+++ b/src/lib/smartlist_core/smartlist_core.c
@@ -213,9 +213,9 @@ smartlist_contains(const smartlist_t *sl, const void *element)
void
smartlist_del(smartlist_t *sl, int idx)
{
- raw_assert(sl);
- raw_assert(idx>=0);
- raw_assert(idx < sl->num_used);
+// raw_assert(sl);
+// raw_assert(idx>=0);
+// raw_assert(idx < sl->num_used);
sl->list[idx] = sl->list[--sl->num_used];
sl->list[sl->num_used] = NULL;
}
@@ -227,9 +227,9 @@ smartlist_del(smartlist_t *sl, int idx)
void
smartlist_del_keeporder(smartlist_t *sl, int idx)
{
- raw_assert(sl);
- raw_assert(idx>=0);
- raw_assert(idx < sl->num_used);
+// raw_assert(sl);
+// raw_assert(idx>=0);
+// raw_assert(idx < sl->num_used);
--sl->num_used;
if (idx < sl->num_used)
memmove(sl->list+idx, sl->list+idx+1, sizeof(void*)*(sl->num_used-idx));
```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problems with NumCPUs > 1:
assert refer to
./lib/smartlist_core/smartlist_core.cThe specific function: