@@ -311,7 +311,6 @@ type CLIArgs struct {
311311 minTLSVersion TLSVersionArg
312312 maxTLSVersion TLSVersionArg
313313 tlsALPNEnabled bool
314- tlsALPNProtos CSVArg
315314 bwLimit uint64
316315 bwBurst int64
317316 bwBuckets uint
@@ -438,7 +437,6 @@ func parse_args() *CLIArgs {
438437 flag .Var (& args .minTLSVersion , "min-tls-version" , "minimum TLS version accepted by server" )
439438 flag .Var (& args .maxTLSVersion , "max-tls-version" , "maximum TLS version accepted by server" )
440439 flag .BoolVar (& args .tlsALPNEnabled , "tls-alpn-enabled" , true , "enable application protocol negotiation with TLS ALPN extension" )
441- flag .Var (& args .tlsALPNProtos , "tls-alpn-protos" , "comma-separated values (RFC 4180) of enabled ALPN identities" )
442440 flag .Uint64Var (& args .bwLimit , "bw-limit" , 0 , "per-user bandwidth limit in bytes per second" )
443441 flag .Int64Var (& args .bwBurst , "bw-limit-burst" , 0 , "allowed burst size for bandwidth limit, how many \" tokens\" can fit into leaky bucket" )
444442 flag .UintVar (& args .bwBuckets , "bw-limit-buckets" , 1024 * 1024 , "number of buckets of bandwidth limit" )
@@ -910,14 +908,10 @@ func makeServerTLSConfig(args *CLIArgs) (*tls.Config, error) {
910908 return nil , err
911909 }
912910 if args .tlsALPNEnabled {
913- if len (args .tlsALPNProtos .values ) == 0 {
914- if ! args .disableHTTP2 {
915- cfg .NextProtos = []string {"h2" , "http/1.1" }
916- } else {
917- cfg .NextProtos = []string {"http/1.1" }
918- }
911+ if ! args .disableHTTP2 {
912+ cfg .NextProtos = []string {"h2" , "http/1.1" }
919913 } else {
920- cfg .NextProtos = args . tlsALPNProtos . values
914+ cfg .NextProtos = [] string { "http/1.1" }
921915 }
922916 }
923917 return & cfg , nil
0 commit comments