somenonymous / OshiUpload

Ephemeral file sharing engine
Do What The F*ck You Want To Public License
164 stars 23 forks source link

Is it possible to use TCP upload via proxy or Tor service? #18

Closed pkreuzt closed 1 year ago

pkreuzt commented 1 year ago

Since there are proxy-capable versions of netcat (nmap's ncat being the most popular) I wonder if this can be done.

I already tried using ncat' proxy settings to run it through tor and connecting to my local Oshi via its onion domain (properly configured to pass the port too) but even when there's no evident error, it doesn't seem to work. No file is uploaded and no URL message is given back. Ncat informs that connection is successful though.

Don't know if I'm missing something or simply this isn't supported.

somenonymous commented 1 year ago

I've just tried uploading via OpenBSD netcat from the netcat-openbsd Debian package, which supports SOCKS proxy via -x option and seems to work just fine with Tor's standard SOCKS port.

nc -v -x 127.0.0.1:9050 5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd.onion 7777 < ./file

Make sure you have all HS ports specified in your torrc:

HiddenServiceDir /var/lib/tor/oshi/
HiddenServicePort 7777 127.0.0.1
HiddenServicePort 7778 127.0.0.1
HiddenServicePort 7779 127.0.0.1
...
pkreuzt commented 1 year ago

After a couple extra tests, I noticed my ncat version was a bit outdated (7.91, while newest is 7.93). Installed 7.93 and now file transfer works, so this turned out to be some problem with older version.