Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/TorSharp/Tools/Tor/TorConfigurationDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public IDictionary<string, List<string>> GetDictionary(Tool tool, TorSharpSettin
{
{ "ControlPort", settings.TorSettings.ControlPort.ToString(CultureInfo.InvariantCulture) }
};

if (settings.TorSettings.HttpTunnelPort != 0)
{
dictionary["HTTPTunnelPort"] = settings.TorSettings.HttpTunnelPort.ToString(CultureInfo.InvariantCulture);
}

if (settings.TorSettings.UseBridges.HasValue)
{
Expand Down
6 changes: 6 additions & 0 deletions src/TorSharp/TorSharpTorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public TorSharpTorSettings()
/// </summary>
public int SocksPort { get; set; }

/// <summary>
/// The port that Tor listens to for HTTP, to use Tor directly as an HTTP proxy, instead of using Privoxy.
/// See https://2019.www.torproject.org/docs/tor-manual.html.en#HTTPTunnelPort for details.
/// </summary>
public int HttpTunnelPort { get; set; }

/// <summary>
/// Additional ports that Tor listens to for SOCKS. These ports are not used by Privoxy but can be used for
/// other purposes. Defaults to an empty list.
Expand Down