Noise: try to use noise in go

This commit is contained in:
mhchia
2020-02-20 17:38:44 +08:00
parent a9f4f285ee
commit 88f660a9c5
5 changed files with 138 additions and 16 deletions

View File

@ -23,9 +23,7 @@ class EchoProcess(BaseInteractiveProcess):
def __init__(
self, port: int, security_protocol: TProtocol, destination: Multiaddr = None
) -> None:
args = [f"-l={port}"]
if security_protocol == PLAINTEXT_PROTOCOL_ID:
args.append("-insecure")
args = [f"-l={port}", f"-security={security_protocol}"]
if destination is not None:
args.append(f"-d={str(destination)}")