Gintas_
Gintas_

Reputation: 5030

Is it possible to send TCP packet to UDP-only server?

I have a UDP server, but I have no UDP capability on client side. Is there a way to send packet via TCP so that UDP server can receive it normally? UDP server cannot be transformed into TCP server.

Reason for wanting to do this is that I'm using a SOCKS5 proxy that does not support UDP associate capability, but I have to use that proxy.

Upvotes: 1

Views: 690

Answers (2)

SergeyA
SergeyA

Reputation: 62553

No, UDP server will not going to accept TCP packets at all (it's a different protocol, so network stack will never propagate those to the application).

If you have to use SOCKS5 proxy, the only way to connect to the said server is by using another proxy-like application, which will stand beyond SOCKS5, accept TCP connections (initiated by app behind SOCKS5 proxy) and retransmit data as UDP.

Upvotes: 0

midor
midor

Reputation: 5557

No. The UDP server cannot complete the 3-way handshake required for TCP. If you have IP-raw sockets, it is actually easier to implement UDP on top. However it seems extremely unlikely that you don't have a UDP-stack.

When you talk about "no UDP capability" do you mean the client has no UDP-stack, or is he just behind some firewall that blocks UDP? In the latter case use a proxy.

Upvotes: 1

Related Questions