rfc1036 / udptunnel Goto Github PK
View Code? Open in Web Editor NEWTunnel UDP packets in a TCP connection
License: GNU General Public License v2.0
Tunnel UDP packets in a TCP connection
License: GNU General Public License v2.0
Thanks for the great work.
Please help me to compile this code for windows.
Regards
# udptunnel -v -s 4096 127.0.0.1:55820
Listening for TCP connections on port 4096
setup_udp_recv: bind: Address in use
But netstat
doesn't show any instance of port 4096. I'm not using it for anything.
So I tried many different ports, but still udptunnel thinks they're all in use.
Any idea?
OpenWrt 23.05.2 (ramips/mt7621 architecture)
udptunnel 1.1-1 installed with opkg
.
System: Debian 5.5.17-1~bpo10+1 (2020-04-23) x86_64 GNU/Linux
systemd ver: 241 (241)
By using udptunnel-(client|server).(service|socket)
with nearly its original version, I tried to start udptunnel-(client|server).socket
.
ListenStream=[::]:443
.At this time, the status was ok. They were active.
Then, I executed the command mtr -T 127.0.0.1 -P 443
on the server VM, and I executed the journalctl -xe
after then. I paste the critical log here:
-- Automatic restarting of the unit udptunnel-server.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
systemd[1]: Stopped udptunnel server.
-- Subject: Unit udptunnel-server.service has finished shutting down
-- Defined-By: systemd
--
-- Unit udptunnel-server.service has finished shutting down.
systemd[1]: Failed to set devices.allow on /system.slice/udptunnel-server.service: Operation not permitted
systemd[1]: Failed to set devices.allow on /system.slice/udptunnel-server.service: Operation not permitted
systemd[1]: Starting udptunnel server...
-- Subject: Unit udptunnel-server.service has begun start-up
-- Defined-By: systemd
-- Unit udptunnel-server.service has begun starting up.
udptunnel[29419]: Expected 2 argument(s)!
udptunnel[29419]: Usage: udptunnel [OPTION]... [[SOURCE:]PORT] DESTINATION:PORT
udptunnel[29419]: -s --server listen for TCP connections
udptunnel[29419]: -i --inetd expect to be started by inetd
......
udptunnel[29419]: SOURCE:PORT must not be specified when using inetd or socket activation.
udptunnel[29419]: If the -s option is used then the program will listen on SOURCE:PORT for TCP
udptunnel[29419]: connections and relay the encapsulated packets with UDP to DESTINATION:PORT.
udptunnel[29419]: Otherwise it will listen on SOURCE:PORT for UDP packets and encapsulate
udptunnel[29419]: them in a TCP connection to DESTINATION:PORT.
systemd[1]: udptunnel-server.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: udptunnel-server.service: Failed with result 'exit-code'.
systemd[1]: Failed to start udptunnel server.
-- Subject: Unit udptunnel-server.service has failed
-- Defined-By: systemd
-- Unit udptunnel-server.service has finished shutting down.
systemd[1]: udptunnel-server.service: Start request repeated too quickly.
systemd[1]: udptunnel-server.service: Failed with result 'exit-code'.
systemd[1]: Failed to start udptunnel server.
-- Subject: Unit udptunnel-server.service has failed
-- Defined-By: systemd
--
-- Unit udptunnel-server.service has failed.
--
-- The result is RESULT.
systemd[1]: udptunnel-server.socket: Failed with result 'service-start-limit-hit'.
The situation for the client VM was nearly the same. I suppose I do not need to duplicate it.
Trying to search what exactly happened for hours but failed.
Hi,
I was referred here by the link at https://www.wireguard.com/known-limitations/
My apologies for the noob question, but I'm not seeing any guide for how to install/implement this. Is such a doc available?
Thanks :)
root@Helsinki:~# udptunnel -s 444 -v 127.0.0.1/433
Listening for TCP connections on port 444
setup_udp_recv: bind: Address already in use
why is that?
which port is in use?
I got confused, it should accepts tcp packets on port 444 and forward them on udp port 433 on the server which another process is listening to(433 UDP)
there is no process listening on port 444.
root@Helsinki:~# udptunnel -s 444 -v 127.0.0.1/433
Listening for TCP connections on port 444
setup_udp_recv: bind: Address already in use
Newbie here.
Correct me if I'm wrong, the above command will accept any incoming TCP traffic on port 444 and then forward that traffic to UDP port 433 on the server, and on the server there should be a process listening to UDP port 433 to get traffic for further process.
If I change 127.0.0.1/433 to 127.0.0.1/436 for example, the command will run without any problem, but there is no process listening on port 436 to get traffic.
udp2raw uses a password.
Server side (192.168.1.106), OpenBSD 7.4, arm64:
# udptunnel -s -v 0.0.0.0:4096 127.0.0.1:51820
Client side (192.168.1.151), Linux, glibc, amd64:
# udptunnel -v 0.0.0.0:51820 192.168.1.106:4096
The server keeps dropping the client. See server logs below.
Received a TCP connection from 192.168.1.151:58656
sendto(udp): Invalid argument
Received a TCP connection from 192.168.1.151:60566
sendto(udp): Invalid argument
Received a TCP connection from 192.168.1.151:46066
sendto(udp): Invalid argument
Do you have any obligations against supporting Multipath TCP for the transport? I'm looking forward to use this as a "proxy" for wireguard over mTCP (I know, kinda hacky setup)
If it's okay for you, I'd add mTCP support that came with the newer kernel revisions
Hello, I am referring to this gist. I've also seen here issues about address is already in use
. I want to talk about it.
First of all, I want to mention that net.ipv6.bindv6only = 0
is fairly legal for every Linux system because many developers may forget about ipv6, and this option should be enabled globally by default. This option enables binding to both 0.0.0.0
and ::
when bind
has been called with just 0.0.0.0
. It allows programs to bind to IPv6 automatically.
So I am going to provide a pull request that will add the IPV6_V6ONLY
option for socket when we are working with ipv6 protocol, because the current bind
logic actually implies it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.