sctp
sctp copied to clipboard
SCTP based TCP relay to a proxy.
I want to write a code to a proxy which utilizes a TCP to SCTP to SCTP to TCP connection. The basic idea is that the client will want to use a HTTP proxy(which can only be used over http/tcp) but to overcome couple network limitations such as roaming and couple other scenarios use SCTP. The proxy(Squid-Cache) has a public IP address and listens on TCP but has no support for SCTP. Since this proxy supports the PROXY protocol(from haproxy) it can provide the TCP proxy with the clients connections details such as src IP+port and dst IP+port. Then the TCP proxy can apply ACL's that will take into account the src and destination IP+port. So two SCTP proxies:
- listens on TCP ip:port and always connects and forwards connections to a specific SCTP ip:port
- listens on SCTP ip:port and forwards connections to the proxy(local) TCP ip:port with or without PROXY protocol connection header.
@ishidawataru I wrote two proxies with this library at:
- https://github.com/elico/sctp-proxies
- http://gogs.ngtech.co.il/NgTech-LTD/sctp-proxies
Tested them to work well locally between two networks via FW. I do not know if sctp works on VPS/compute instances at DigitalyOcean or another provides such as EC2 or Azure.