Comments (15)
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.
Original comment by [email protected]
on 2 May 2013 at 1:11
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from badvpn.
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.
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.
sounds great!
Original comment by [email protected]
on 2 May 2013 at 1:25
from badvpn.
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.
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.
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.
Ignore me, had another instance running doh!
testing now..
Original comment by [email protected]
on 2 May 2013 at 3:10
from badvpn.
Works great!
thank you very much!
Original comment by [email protected]
on 3 May 2013 at 8:43
from badvpn.
Original comment by [email protected]
on 3 May 2013 at 11:20
- Changed state: Fixed
from badvpn.
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.
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.
Oh, and add "valgrind output" to that list.
Original comment by [email protected]
on 7 May 2013 at 1:36
from badvpn.
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)
- How to build tun2socks on Windows HOT 4
- How to build tun2socks on Windows HOT 1
- wont work on Windows Xp (faild to get ConnectEx) HOT 5
- Ignore certain ports? HOT 6
- calling net.ipv4.dhcp on tun device fails HOT 7
- cant write to file HOT 4
- [deleted issue]
- Feature request: UDP support
- Can not intilise tun2socks DeviceIoControl(TAP_IOCTL_GET_MTU) failed HOT 1
- tun2socks on Win7 doesn't work HOT 6
- Can not intilise tun2socks DeviceIoControl(TAP_IOCTL_GET_MTU) failed HOT 1
- How can i log the sites visited by badvpn HOT 1
- This is a little bit complicated. HOT 4
- No SOCKS authentication HOT 9
- Connects/routes perfectly but after 5 minutes connections revert to normal route? HOT 13
- Possible to forward DNS lookups through socks server? HOT 6
- Failed to parse arguments if <human_name_of_TUN_device> contains spaces HOT 2
- Where does the badvpn-udpgw process run at ? HOT 1
- tun2socks not picking up traffic straight after reboot HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from badvpn.