jpillora / chisel

A fast TCP/UDP tunnel over HTTP
MIT License
12.77k stars 1.35k forks source link

Need a way to override hardcoded max UDP message size of 9012 #357

Open frs3 opened 2 years ago

frs3 commented 2 years ago

The max UDP message size is currently hardcoded to 9012. We would like to increase it, since our max workload message size is greater.

Quick fix:

export CHISEL_UDP_MAX_SIZE=12000

share\tunnel\tunnel_out_ssh_udp.go:80 share\tunnel\tunnel_in_proxy_udp.go:83

const maxMTU = settings.EnvInt("UDP_MAX_SIZE", 9012)

or command line param e.g. --udp-max-size 12000

Masterxilo commented 2 years ago

why don't you create a pull request?

It should probably read const maxMTU = settings.EnvInt("CHISEL_UDP_MAX_SIZE", 9012). Or as you said, use a command line param. Does chisel/go have a library (integrated) that allows both? Might be useful to be able to provide all commandline options via env. variables (or a config file), whatever is most convenient.

jpillora commented 2 years ago

Yep happy to put max MTU behind a env setting

jpillora commented 2 years ago

Plz raise PR

frs3 commented 2 years ago

PR https://github.com/jpillora/chisel/pull/367

On Fri, 17 Jun 2022 at 00:42, Jaime Pillora @.***> wrote:

Plz raise PR

— Reply to this email directly, view it on GitHub https://github.com/jpillora/chisel/issues/357#issuecomment-1158275906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABARCCYBYCGESXF22656XQ3VPO3U3ANCNFSM5V5PICXQ . You are receiving this because you authored the thread.Message ID: @.***>