Comment cleanup

This commit is contained in:
Russ Magee 2023-11-03 23:57:55 -07:00
parent 119c039b91
commit 74be6173b6
5 changed files with 31 additions and 36 deletions

View file

@ -308,9 +308,9 @@ func _new(kexAlg KEXAlg, conn *net.Conn) (hc *Conn, e error) {
// applyConnExtensions processes optional Dial() negotiation
// parameters. See also getkexalgnum().
//
// Currently defined extension values
// # Currently defined extension values
//
// KEx algs
// # KEx algs
//
// KEX_HERRADURA256 KEX_HERRADURA512 KEX_HERRADURA1024 KEX_HERRADURA2048
//
@ -318,11 +318,11 @@ func _new(kexAlg KEXAlg, conn *net.Conn) (hc *Conn, e error) {
//
// KEX_NEWHOPE KEX_NEWHOPE_SIMPLE
//
// Session (symmetric) crypto
// # Session (symmetric) crypto
//
// C_AES_256 C_TWOFISH_128 C_BLOWFISH_128 C_CRYPTMT1 C_CHACHA20_12 C_HOPSCOTCH
//
// Session HMACs
// # Session HMACs
//
// H_SHA256 H_SHA512
func (hc *Conn) applyConnExtensions(extensions ...string) {
@ -882,12 +882,12 @@ func HKExAcceptSetup(c *net.Conn, hc *Conn) (err error) {
// Dial as net.Dial(), but with implicit key exchange to set up secure
// channel on connect
//
// Can be called like net.Dial(), defaulting to C_AES_256/H_SHA256,
// or additional extensions can be passed amongst the following:
// Can be called like net.Dial(), defaulting to C_AES_256/H_SHA256,
// or additional extensions can be passed amongst the following:
//
// "C_AES_256" | "C_TWOFISH_128" | ...
// "C_AES_256" | "C_TWOFISH_128" | ...
//
// "H_SHA256" | "H_SHA512" | ...
// "H_SHA256" | "H_SHA512" | ...
//
// See go doc -u xsnet.applyConnExtensions
func Dial(protocol string, ipport string, extensions ...string) (hc Conn, err error) {
@ -1423,6 +1423,9 @@ func (hc Conn) Read(b []byte) (n int, err error) {
// let the server know to hang up on Dial()ed server rports.
_ = binary.BigEndian.Uint16(payloadBytes[0:2])
//logger.LogDebug(fmt.Sprintf("[Server] Got CSOTunKeepAlive"))
// though CSOTunKeepAlive sends an endp (uint16), we don't use it,
// preferring to refresh *all* tunnels on the message.
// (?rlm 2023-11-04 -- TODO: verify this, it's been a while.)
for _, t := range *hc.tuns {
hc.Lock()
t.KeepAlive = 0