{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1731652387,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{ "schema":"libjg2-1",
"oid":{ "oid": "6328231f2aa628632344d96a58e25c3b194af506", "alias": [ "refs/heads/main"]},"tree": [
{ "name": "README.md","mode": "33188", "size":1809},
{ "name": "protocol_lws_raw_proxy.c","mode": "33188", "size":14937}],"s":{"c":1731652387,"u": 652}}
,{"schema":"libjg2-1",
"cid":"417ca92647480d69d3f3d54e856d0fbf",
"oid":{ "oid": "6328231f2aa628632344d96a58e25c3b194af506", "alias": [ "refs/heads/main"]},"blobname": "plugins/raw-proxy/README.md", "blob": "# raw-proxy plugin\n\n## Enabling for build\n\n```\n$ cmake .. -DLWS_ROLE_RAW_PROXY\u003d1\n```\n\n## configuration pvo\n\n|pvo|value meaning|\n|---|---|\n|onward|The onward proxy destination, in the form `ipv4:addr[:port]`|\n\n## Note for vhost selection\n\nNotice that since it proxies the packets \u0022raw\u0022, there's no SNI or Host:\nheader to resolve amongst multiple vhosts on the same listen port. So the\nvhost you associate with this protocol must be alone on its own port.\n\nIt's also possible to apply this or other role + protocols as a fallback after\nhttp[s] processing rejected the first packet from an incoming connection.\nSee `./READMEs/README-http-fallback.md`\n\n## Note for packet size\n\nFor throughput, since often one side is localhost that can handle larger\npackets easily, you should create the context used with this plugin with\n\n```\n\tinfo.pt_serv_buf_size \u003d 8192;\n```\n\nlwsws already does this.\n\n## Using with C\n\nSee the minimal example `./minimal-example/raw/minimal-raw-proxy` for\na working example of a vhost that accepts connections and then\nproxies them using this plugin. The example is almost all boilerplate\nfor setting up the context and the pvo.\n\n## Using with lwsws\n\nFor a usage where the plugin \u0022owns\u0022 the whole vhost, you should enable the\nplugin protocol on the vhost as usual, and specify the \u0022onward\u0022 pvo with:\n\n```\n \u0022ws-protocols\u0022: [{\n \u0022raw-proxy\u0022: {\n \u0022status\u0022: \u0022ok\u0022,\n \u0022onward\u0022: \u0022ipv4:remote.address.com:port\u0022\n }\n }],\n```\n\nand then define the vhost with:\n\n```\n \u0022apply-listen-accept\u0022: \u00221\u0022,\n \u0022listen-accept-role\u0022: \u0022raw-proxy\u0022,\n \u0022listen-accept-protocol\u0022: \u0022raw-proxy\u0022\n```\n\nwhich tells it to apply the role and protocol as soon as a connection is\naccepted on the vhost.\n","s":{"c":1731652387,"u": 331}}
],"g": 2996,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}