Socks5 via local socksport on my pc, the socks5 protocol, why more hops in circuit

hello everyone,
i am hoping to get a better understanding of the socks5 protocol, i am using core tor, and i just want to get a idea and even more if possible, of what all socks5 does or how it works, and why my circuit is usually 5-6 relays long. as compared to using tor browser and its only 3 unless visiting a .onion. i would also like to ask when should i consider using something other than cookie auth. that is what i am using now and i think i got a pretty good idea already but it wouldnt hurt to hear what other people have to say about authentication. and another question i have is about tor choosing the circuit it does, i have done some reading and i know that tor tries to use the same couple entry guards for about a month. but the rest of my circuit seems like it rotates through the same relays and they are all in the same region of the world, with the occasional random but those randoms are part of the same rotation i have noticed. i was just hoping to hear from people who are more familiar with tor and how the protocol works by default in terms of choosing circuits and how it goes about that when it changes the rotation of relays, and maybe some input on changing or not changing the default tor settings, which i am running default everything right now. my main goal here is to better understand how tor works and why it chooses the relays it does and when that changes and why. also what does binding socksport to one port do? i see that in torrc. or should i say “bind to local host: 9050” what does that do? like i said i have running as default settings right now.

i also want to say that i think the internet and the culture involving the internet, and things like tor, and open source projects is awesome. absolutely amazing, and makes the internet the amazing resource it is. the place where you can learn pretty much anything, and people from all over the world help each other and learn from each other, its truly a amazing thing, and people put all this time and effort into things that people utilize everyday for FREE, so someone else can learn and teach and benefit themselves and others, for FREE, that has completely changed humanity forever. and i know alot of people know this, but just know that i want you to know that by getting on forums like this, or being a part of open source projects and even more that you are apart of HISTORY, making the internet what it is. and the internet is still in its infancy, it doesnt seem like it now but it really is, but everyone who takes part in these things that are FREE, and give people amazing resources. or get on forums to answer other people questions, or help with things like tor, they are apart of HISTORY, making the internet what its been and still is. so just know that

It’s none of my business but if you want people to read your posts (and respond) you should format them for the human mind.
One long 300+ word paragraph does not inspire one to read. No formatting also does not inspire one to read. Separate your thoughts into different paragraphs instead of one long one.

As an example:

I am hoping to get a better understanding of the socks5 protocol.

I am using core tor, and I just want to get a idea and even more if possible, of what all socks5 does or how it works, and why my circuit is usually 5-6 relays long. As compared to using tor browser and its only 3 unless visiting a .onion. 

I would also like to ask when should I consider using something other than cookie auth. That is what I am using now and I think I got a pretty good idea already but it wouldnt hurt to hear what other people have to say about authentication. 

I can understand that maybe English may not be your first language but every language I can understand and recognise has formatting and punctuation. Spelling is not that important. Humans can understand misspelled words by context. Yours is perfect.

I never got around to finishing reading your post. Bet I’m not the first.

1 Like

To get a general idea this old document might be a good starting point: https://svn-archive.torproject.org/svn/projects/design-paper/tor-design.pdf

The linked design document should give some insights, especially regarding what effects the tweaking of some default settings might have (see https://manpages.debian.org/experimental/tor/tor.1.en.html for example to see supported options in torrc)

And regarding your questions: How do you determine “circuit is usually 5-6 relays long” at this moment?
For me it seems you are kind of mixing up tor and SOCKS5: Tor's extensions to the SOCKS protocol - Tor Specifications

More detailed questions might be answered by this compendium (spec.torproject.org) too :wink:

1 Like

thank you i appreciate it

1 Like

i do have another question as well and hopefully you have a answer, if not its all good i do appreciate you answering me already.

in torrc there is a “# Default: Bind to localhost:9049 for local connections.”

what does this do?

You said port 9050 in your original post, so I’m assuming you mean this line in torrc:

#SocksPort 9050 # Default: Bind to localhost:9050 for local connections.

This is just telling you that the default behaviour for tor is to listen on localhost (127.0.0.1) on port 9050 for SOCKS connections. Rather than, say, listening on all adapters.

This is usually sufficient if you are using one workstation. But if you want to set up tor to listen on a LAN-facing adapter too, so that one tor instance can provide tor functionality for your LAN, then you need to specify more or different addresses to listen on. For example, mine something like:

SocksPort 127.0.0.1:9050
SocksPort 10.20.0.1:9050

So it will listen on localhost and on a LAN-facing adapter.
I caution against SocksPort 9050 as this will cause it to listen on all adapters, including internet-facing ones.

I’m curious, what are you using to view your hops with?

Oh, and welcome to Tor and to the forum. Don’t worry, some of us enjoy reading full posts. :wink:

2 Likes

hey thanks for helping out i really appreciate it! that helps out for sure but still wanted to double check on something.

in my torrc it does say “# Default: Bind to localhost:9049 for local connections.” and not port 9050 for some reason idk why. tor signature did get checked when i downloaded it.

but i have never uncommented anything in my torrc, so its all based of the " defaults-torrc" file that is not the complete name of file but you probably know what im talking about.

so after reading what you said the defaults file does not say “bind to localhost:9050” it just says “socksport 9050” so does that mean other devices on my LAN could use that port?

and i use nyx to see my circuit. i think its pretty handy. i usally see OUTBOUND then CIRCUIT then GUARD-MIDDLE-END sometimes two middle relays.

so i was hoping to learn everything i could about socks protocol and why that is the way it is. just want to understand everything as much as i can.

thanks again for helping out

1 Like

Yes, and if you have any internet facing adapters on that machine it means the whole internet can use it too.

I recommend something more moderate. If you only use tor on that machine, then: SocksPort 127.0.0.1:9050. If you want to allow other local machines on your LAN to also use tor on that machine, then add that machine’s LAN adapter address:

SocksPort 127.0.0.1:9050
SocksPort <LAN_ADAPTER_ADDRESS>:9050
1 Like

No, if you do not specify any IP it will only listen to localhost.
#SocksPort 9050 # Default: Bind to localhost:9050 for local connections.

2 Likes

Thanks for the correction. It makes sense SocksPort works differently.

1 Like

awesome. thanks for the info both of you, i really appreciate it.

1 Like