bagder,
@bagder@mastodon.social avatar

To use with , use --socks5-hostname or the socks5h:// scheme for the hostname set with -x / --proxy.

curl has worked fine for Tor transfers for decades.

Those options make curl tell the proxy to do the name resolving instead of doing it itself.

notroot,

@bagder Blog post or it didn't happen ;)

bagder,
@bagder@mastodon.social avatar
spv,

@bagder alternatively, torsocks works fine, right?

bagder,
@bagder@mastodon.social avatar

@spv such "hacks" can't work for normal TCP clients for .onion names for example. But sure, if you want to access a public site on "the other side" of Tor, then it works as well. Just a little pointless.

spv,

@bagder interesting. torsocks works fine for onion and clearnet. with regular curl, --proxy socks5://127.0.0.1:9050 clearnet works, but onion does not, and with --proxy socks5h://127.0.0.1:9050 both work

a000d4f7a91939d0e71df1646d7a48,
@a000d4f7a91939d0e71df1646d7a48@anticapitalist.party avatar

@spv @bagder that's because in curl, socks5 means "curl does dns resolution, then asks socks5 proxy to connect to an ip", while socks5h means "curl asks socks5 proxy to connect to domain name".
Using curl's socks5:// (no h) with Tor is essentially a DNS leak, always use socks5h for that purpose.

bagder,
@bagder@mastodon.social avatar

@a000d4f7a91939d0e71df1646d7a48 @spv then how does torsocks work for curl with .onion?

spv,

@bagder @a000d4f7a91939d0e71df1646d7a48 i think it intercepts DNS, don't quote me on that though

bagder,
@bagder@mastodon.social avatar

@spv @a000d4f7a91939d0e71df1646d7a48 oh right, of course. If torsocks itself can resolve the host, it can just intercept getaddrinfo() and return the suitable IP back to the tool it runs. Sorry, I was clearly not thinking all the way here!

rticks, (edited )
@rticks@mastodon.social avatar

@bagder in the times to come mandatory

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • thenastyranch
  • modclub
  • everett
  • rosin
  • Youngstown
  • slotface
  • ethstaker
  • mdbf
  • kavyap
  • osvaldo12
  • InstantRegret
  • Durango
  • megavids
  • ngwrru68w68
  • tester
  • khanakhh
  • love
  • tacticalgear
  • cubers
  • GTA5RPClips
  • Leos
  • normalnudes
  • provamag3
  • cisconetworking
  • anitta
  • JUstTest
  • All magazines