switcher icon indicating copy to clipboard operation
switcher copied to clipboard

Openvpn support

Open DimShadoWWW opened this issue 10 years ago • 2 comments

Will you include openvpn support?? I was trying to add it, but my knowledge about Go (and many search in google) doesn't helped in port the openvpn protocol detection from sslh:

static int is_openvpn_protocol (const char*p,int len, struct proto *proto)
{
int packet_len;
if (len < 2)
return PROBE_AGAIN;
packet_len = ntohs(*(uint16_t*)p);
return packet_len == len - 2;
}

I even tried including "C" and with this code:

packet_len := uint16(C.ntohs(C.uint16_t(header)))
return packet_len == len(header)-2

but cgo failed to compile it with this error:

could not determine kind of name for C.ntohs
could not determine kind of name for C.uint16_t

DimShadoWWW avatar Jan 23 '15 12:01 DimShadoWWW

have a try at ssl supported in my pull request.

in sslh, openvpn protocol relies on ssl, so ssl protocol support is enough to identity openvpn protocol if you don't have any other ssl protocols

qiukeren avatar Oct 09 '16 08:10 qiukeren

I am not a programmer, but if you could add openvpn and other functionalities (based on sslh) that would be fantastic. I will be happy to test and give feedback.

beatquantum avatar Nov 05 '23 09:11 beatquantum