1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 package main 2 3 import ( 4 "net" 5 "sync" 6 "crypto/rand" 7 "crypto/tls" 8 "log" 9 "encoding/json" 10 ) 11 12 13 func 14 main() { 15 16 cert, err := tls.LoadX509KeyPair( "OreOre.pem", "OreOre.pem" ) 17 if err != nil { log.Fatalf( "LoadX509KeyPair:%v", err ) } 18 config := &tls.Config{ 19 Certifica