0

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?

  • 1
    If I understand what you're asking correctly, then you don't. You point Tor's HiddenServicePort at the httpd and Tor handles setting up and publishing the onion service. – cacahuatl Aug 3 '16 at 20:30
  • @canonizingironize Got it. Thanks. Will try that out. – goodguys_activate Aug 3 '16 at 20:48
2

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. C:\Users\Bob\Desktop\Tor\

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 C:\Users\Bob\Desktop\Tor\torrc

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.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.