@@ -37,6 +37,7 @@ const ONION3: u32 = 445;
3737const P2P : u32 = 421 ;
3838const P2P_CIRCUIT : u32 = 290 ;
3939const QUIC : u32 = 460 ;
40+ const QUIC_V1 : u32 = 461 ;
4041const SCTP : u32 = 132 ;
4142const TCP : u32 = 6 ;
4243const TLS : u32 = 448 ;
@@ -92,6 +93,7 @@ pub enum Protocol<'a> {
9293 P2p ( Multihash ) ,
9394 P2pCircuit ,
9495 Quic ,
96+ QuicV1 ,
9597 Sctp ( u16 ) ,
9698 Tcp ( u16 ) ,
9799 Tls ,
@@ -182,6 +184,7 @@ impl<'a> Protocol<'a> {
182184 . and_then ( |s| read_onion3 ( & s. to_uppercase ( ) ) )
183185 . map ( |( a, p) | Protocol :: Onion3 ( ( a, p) . into ( ) ) ) ,
184186 "quic" => Ok ( Protocol :: Quic ) ,
187+ "quic-v1" => Ok ( Protocol :: QuicV1 ) ,
185188 "ws" => Ok ( Protocol :: Ws ( Cow :: Borrowed ( "/" ) ) ) ,
186189 "wss" => Ok ( Protocol :: Wss ( Cow :: Borrowed ( "/" ) ) ) ,
187190 "x-parity-ws" => {
@@ -314,6 +317,7 @@ impl<'a> Protocol<'a> {
314317 }
315318 P2P_CIRCUIT => Ok ( ( Protocol :: P2pCircuit , input) ) ,
316319 QUIC => Ok ( ( Protocol :: Quic , input) ) ,
320+ QUIC_V1 => Ok ( ( Protocol :: QuicV1 , input) ) ,
317321 SCTP => {
318322 let ( data, rest) = split_at ( 2 , input) ?;
319323 let mut rdr = Cursor :: new ( data) ;
@@ -437,6 +441,7 @@ impl<'a> Protocol<'a> {
437441 w. write_u16 :: < BigEndian > ( addr. port ( ) ) ?
438442 }
439443 Protocol :: Quic => w. write_all ( encode:: u32 ( QUIC , & mut buf) ) ?,
444+ Protocol :: QuicV1 => w. write_all ( encode:: u32 ( QUIC_V1 , & mut buf) ) ?,
440445 Protocol :: Utp => w. write_all ( encode:: u32 ( UTP , & mut buf) ) ?,
441446 Protocol :: Udt => w. write_all ( encode:: u32 ( UDT , & mut buf) ) ?,
442447 Protocol :: Http => w. write_all ( encode:: u32 ( HTTP , & mut buf) ) ?,
@@ -498,6 +503,7 @@ impl<'a> Protocol<'a> {
498503 P2p ( a) => P2p ( a) ,
499504 P2pCircuit => P2pCircuit ,
500505 Quic => Quic ,
506+ QuicV1 => QuicV1 ,
501507 Sctp ( a) => Sctp ( a) ,
502508 Tcp ( a) => Tcp ( a) ,
503509 Tls => Tls ,
@@ -534,6 +540,7 @@ impl<'a> Protocol<'a> {
534540 P2p ( _) => "p2p" ,
535541 P2pCircuit => "p2p-circuit" ,
536542 Quic => "quic" ,
543+ QuicV1 => "quic-v1" ,
537544 Sctp ( _) => "sctp" ,
538545 Tcp ( _) => "tcp" ,
539546 Tls => "tls" ,
0 commit comments