Code Monkey home page Code Monkey logo

Comments (15)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
I believe it is not possible to make the connections originate from the source 
IP, due to the way IP works (maybe it's possible with advanced configuration in 
Linux i.e. policy routing...).

However it will be very easy to include the source IP to the SOCKS. Actually, 
putting it in the username/password seems like a great idea, because it doesn't 
involve extending the SOCKS protocol.

I propose that the source be encoded into the username by appending 
@ip_address:port to the username specified on command line. Is this acceptable 
for you?


Original comment by [email protected] on 2 May 2013 at 1:10

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024

Original comment by [email protected] on 2 May 2013 at 1:11

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
That would be perfect.. so if I understand the command line would be something 
like:

badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 
255.255.255.0 --socks-server-addr 127.0.0.1:8880 --username=@ip_address:port 
--password=whatever

Then my socks would get the username as '192.168.0.100:1234' as user and 
'whatever' as password?

?

Original comment by [email protected] on 2 May 2013 at 1:14

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
No, there would be an --append-source-to-username option; no need to complicate 
with substitutions. If you have "--username foo", you'd get usernames like 
[email protected]:54321.

Original comment by [email protected] on 2 May 2013 at 1:24

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
sounds great!

Original comment by [email protected] on 2 May 2013 at 1:25

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
It's commited. Please test, as I didn't have a setup handy.

Original comment by [email protected] on 2 May 2013 at 2:49

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Loaded and compiled.. I can't run it though, using the same setup as before 
with same command line I now get:

root@84-16-252-204:/badvpn/build# badvpn-tun2socks --tundev tun0 --netif-ipaddr 
10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:8880
NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.127
ERROR(BTap): error configuring device
ERROR(tun2socks): BTap_Init failed
NOTICE(tun2socks): exiting

The tun0 device is there and configured as 10.0.0.1 as before.

Any ideas? Before updating I was using the download from the zip 
badvpn-1.999.127.tar.bz2 so it might be another change apart from the username 
thing?

Original comment by [email protected] on 2 May 2013 at 3:04

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
The new version is in there as I can see the new command option in the help:

--append-source-to-username

Original comment by [email protected] on 2 May 2013 at 3:08

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Ignore me, had another instance running doh!

testing now..

Original comment by [email protected] on 2 May 2013 at 3:10

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Works great!

thank you very much!

Original comment by [email protected] on 3 May 2013 at 8:43

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024

Original comment by [email protected] on 3 May 2013 at 11:20

  • Changed state: Fixed

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
I'm wondering if there is a possible thread safety issue with the change. I've 
noticed a couple of times the app hangs and I have to kill it with killall and 
I wonder if this could explain it.

Looking at the change I see you are changing the socks_auth_info per connection 
if the options.append_source_to_username option is set. But from what I see 
that structure is shared with all connections so if two connections come at the 
same time and they both try to change that struct.. 1) the info might be 
incorrect and 2) the OS might throw a fit.

Or maybe I'm not seeing something here?

Original comment by [email protected] on 7 May 2013 at 11:47

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
This is definitely not a thread safety issue, because there are no threads. 
Please open another issue about the problem and provide as much info as 
possible. This includes:

- What happens - i.e. "it hangs" is not very descriptive. Do existing 
connections stop working, or just new ones? What is tun2socks writing to the 
console?
- What you were doing (is this specific to some web site or kind of traffic 
etc).
- Output of tun2socks when you pass "--loglevel debug".
- Output when you run tun2socks via strace.

Can you reproduce this with the 1.999.127 version? The problem is almost 
certainly not related to this source address change, but might be related to 
the lwIP update that tun2socks received recently (along with IPv6 support).

Original comment by [email protected] on 7 May 2013 at 1:35

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Oh, and add "valgrind output" to that list.

Original comment by [email protected] on 7 May 2013 at 1:36

from badvpn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
OK will do.. I'm still setting up my system so have not had chance to play 
around with it properly yet.

Will have a good look in the next day or so and get back to you if the problem 
continues.

Original comment by [email protected] on 7 May 2013 at 1:38

from badvpn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.