@@ -3,9 +3,9 @@ use anyhow::Context;
3
3
use clap:: { Parser , Subcommand } ;
4
4
use dumbpipe:: NodeTicket ;
5
5
use iroh_net:: {
6
+ endpoint:: { get_remote_node_id, Connecting } ,
6
7
key:: SecretKey ,
7
- magic_endpoint:: { get_remote_node_id, Connecting } ,
8
- MagicEndpoint , NodeAddr ,
8
+ Endpoint , NodeAddr ,
9
9
} ;
10
10
use std:: {
11
11
io,
@@ -258,7 +258,7 @@ async fn forward_bidi(
258
258
259
259
async fn listen_stdio ( args : ListenArgs ) -> anyhow:: Result < ( ) > {
260
260
let secret_key = get_or_create_secret ( ) ?;
261
- let endpoint = MagicEndpoint :: builder ( )
261
+ let endpoint = Endpoint :: builder ( )
262
262
. alpns ( vec ! [ args. common. alpn( ) ?] )
263
263
. secret_key ( secret_key)
264
264
. bind ( args. common . magic_port )
@@ -320,7 +320,7 @@ async fn listen_stdio(args: ListenArgs) -> anyhow::Result<()> {
320
320
321
321
async fn connect_stdio ( args : ConnectArgs ) -> anyhow:: Result < ( ) > {
322
322
let secret_key = get_or_create_secret ( ) ?;
323
- let endpoint = MagicEndpoint :: builder ( )
323
+ let endpoint = Endpoint :: builder ( )
324
324
. secret_key ( secret_key)
325
325
. alpns ( vec ! [ ] )
326
326
. bind ( args. common . magic_port )
@@ -353,7 +353,7 @@ async fn connect_tcp(args: ConnectTcpArgs) -> anyhow::Result<()> {
353
353
. to_socket_addrs ( )
354
354
. context ( format ! ( "invalid host string {}" , args. addr) ) ?;
355
355
let secret_key = get_or_create_secret ( ) ?;
356
- let endpoint = MagicEndpoint :: builder ( )
356
+ let endpoint = Endpoint :: builder ( )
357
357
. alpns ( vec ! [ ] )
358
358
. secret_key ( secret_key)
359
359
. bind ( args. common . magic_port )
@@ -370,7 +370,7 @@ async fn connect_tcp(args: ConnectTcpArgs) -> anyhow::Result<()> {
370
370
async fn handle_tcp_accept (
371
371
next : io:: Result < ( tokio:: net:: TcpStream , SocketAddr ) > ,
372
372
addr : NodeAddr ,
373
- endpoint : MagicEndpoint ,
373
+ endpoint : Endpoint ,
374
374
handshake : bool ,
375
375
alpn : & [ u8 ] ,
376
376
) -> anyhow:: Result < ( ) > {
@@ -429,7 +429,7 @@ async fn listen_tcp(args: ListenTcpArgs) -> anyhow::Result<()> {
429
429
Err ( e) => anyhow:: bail!( "invalid host string {}: {}" , args. host, e) ,
430
430
} ;
431
431
let secret_key = get_or_create_secret ( ) ?;
432
- let endpoint = MagicEndpoint :: builder ( )
432
+ let endpoint = Endpoint :: builder ( )
433
433
. alpns ( vec ! [ args. common. alpn( ) ?] )
434
434
. secret_key ( secret_key)
435
435
. bind ( args. common . magic_port )
0 commit comments