Skip to content

Openvpn support #3

@DimShadoWWW

Description

@DimShadoWWW

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions