I want to run ASP.NET Core on a non Windows machine with Tor.
How can I configure IIS / ASP.NET Core to publish an HSP endpoint?
Configure your chosen httpd to listen on
127.0.0.1:80 (the port can be arbitrary, just update the value in the torrc to match).
Then download a copy of the Tor Expert Bundle, extract it into a folder on your Desktop or similar, e.g.
Create a flat text file with contents like:
SocksPort 0 # we don't need SOCKS, we're not a client DataDirectory "C:\\Users\\Bob\\Desktop\\Tor\\Data" # I think this should be reasonable for a Windows users Tor data? HiddenServiceDir "C:\\Users\\Bob\\Desktop\\Tor\\Data\\onion" HiddenServicePort 80 80 # points port 80 on the onion to a service running on 127.0.0.1:80 Log notice file "C:\\Users\\Bob\\Desktop\\Tor\\Data\\notice.log"
Save the file to somewhere like
Now open up cmd.exe and nagivate to
C:\Users\Bob\Desktop\Tor\Tor and launch
tor.exe with a command line
tor.exe -f C:\Users\Bob\Desktop\Tor\torrc. If I recall correctly,
tor.exe has issues with printing output to the Windows terminal (
cmd.exe) so check the file set as the log above, and ensure that everything looks okay.
If all went well, you'll now have a file at
C:\Users\Bob\Desktop\Tor\Data\onion\hostname which will contain the .onion address generated. Give it a minute or so to publish then try to visit the address in the file, and it should connect to your httpd.
(Given your previous question about scallion, you can stop
tor.exe then replace the content of the
C:\Users\Bob\Desktop\Tor\Data\onion\private_key with one of the generated keys, then start tor and it should publish for the custom onion hostname.)