mirror of https://gogs.blitter.com/RLabs/xs
Changed Dial opt from "-R" to "OPT_REMOD"
This commit is contained in:
parent
aac48496f0
commit
eef71dd59c
2
xs/xs.go
2
xs/xs.go
|
@ -972,7 +972,7 @@ func main() { //nolint: funlen, gocyclo
|
||||||
|
|
||||||
remodExtArg := ""
|
remodExtArg := ""
|
||||||
if remodRequested {
|
if remodRequested {
|
||||||
remodExtArg = "-R"
|
remodExtArg = "OPT_REMOD"
|
||||||
}
|
}
|
||||||
// Pass opt to Dial() via extensions arg
|
// Pass opt to Dial() via extensions arg
|
||||||
conn, err := xsnet.Dial(proto, server, cipherAlg, hmacAlg, kexAlg, kcpMode, remodExtArg)
|
conn, err := xsnet.Dial(proto, server, cipherAlg, hmacAlg, kexAlg, kcpMode, remodExtArg)
|
||||||
|
|
|
@ -709,7 +709,7 @@ func main() { //nolint:funlen,gocyclo
|
||||||
// proposes to use it.
|
// proposes to use it.
|
||||||
if !remodSupported {
|
if !remodSupported {
|
||||||
if (conn.Opts() & xsnet.CORemodulateShields) != 0 {
|
if (conn.Opts() & xsnet.CORemodulateShields) != 0 {
|
||||||
logger.LogDebug("[client proposed -R, but we don't support it.]")
|
logger.LogDebug("[client proposed cipher/hmac remod, but we don't support it.]")
|
||||||
conn.Close()
|
conn.Close()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,8 +363,8 @@ func (hc *Conn) applyConnExtensions(extensions ...string) {
|
||||||
log.Println("[extension arg = H_SHA512]")
|
log.Println("[extension arg = H_SHA512]")
|
||||||
hc.cipheropts &= (0xFFFF00FF)
|
hc.cipheropts &= (0xFFFF00FF)
|
||||||
hc.cipheropts |= (HmacSHA512 << 8)
|
hc.cipheropts |= (HmacSHA512 << 8)
|
||||||
case "-R":
|
case "OPT_REMOD":
|
||||||
log.Println("[extension arg = -R]")
|
log.Println("[extension arg = OPT_REMOD]")
|
||||||
hc.opts |= CORemodulateShields
|
hc.opts |= CORemodulateShields
|
||||||
//default:
|
//default:
|
||||||
// log.Printf("[Dial ext \"%s\" ignored]\n", s)
|
// log.Printf("[Dial ext \"%s\" ignored]\n", s)
|
||||||
|
|
Loading…
Reference in New Issue