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 := ""
|
||||
if remodRequested {
|
||||
remodExtArg = "-R"
|
||||
remodExtArg = "OPT_REMOD"
|
||||
}
|
||||
// Pass opt to Dial() via extensions arg
|
||||
conn, err := xsnet.Dial(proto, server, cipherAlg, hmacAlg, kexAlg, kcpMode, remodExtArg)
|
||||
|
|
|
@ -709,7 +709,7 @@ func main() { //nolint:funlen,gocyclo
|
|||
// proposes to use it.
|
||||
if !remodSupported {
|
||||
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()
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -363,8 +363,8 @@ func (hc *Conn) applyConnExtensions(extensions ...string) {
|
|||
log.Println("[extension arg = H_SHA512]")
|
||||
hc.cipheropts &= (0xFFFF00FF)
|
||||
hc.cipheropts |= (HmacSHA512 << 8)
|
||||
case "-R":
|
||||
log.Println("[extension arg = -R]")
|
||||
case "OPT_REMOD":
|
||||
log.Println("[extension arg = OPT_REMOD]")
|
||||
hc.opts |= CORemodulateShields
|
||||
//default:
|
||||
// log.Printf("[Dial ext \"%s\" ignored]\n", s)
|
||||
|
|
Loading…
Reference in New Issue