Open JustTalDevelops opened 2 years ago
It might be better to have the compressors and encryptors configurable themselves, maybe in ListenConfigs or Protocol implementations. Could be useful for custom Protocol implementations.
It might be better to have the compressors and encryptors configurable themselves, maybe in ListenConfigs or Protocol implementations. Could be useful for custom Protocol implementations.
I think this is the way to go. It doesn't make sense to put it in ListenConfigs, as compression/encryption is really only tweaked with when using Gophertunnel over a different Protocol.
I wouldn't put this in Protocol either, these are both a different layer than the protocol. Without the correct compression type, you can't find the protocol.
Where would you put this then? Listen/Dial configs?
Probably, honestly.
Coming back to this, with 1.19.30 coming, it would probably make sense to put this in the protocol, as we can now find the protocol before we need to (de)compress or encrypt.
In certain cases those settings can be undesired, although they should certainly be on by default.