mirror of
				https://github.com/dndx/phantun.git
				synced 2025-11-04 11:55:34 +08:00 
			
		
		
		
	perf(fake-tcp) reduce the number of clone() calls in hot path
				
					
				
			This commit is contained in:
		@@ -108,6 +108,7 @@ async fn main() {
 | 
			
		||||
    } else {
 | 
			
		||||
        panic!("only IPv4 remote address is supported");
 | 
			
		||||
    };
 | 
			
		||||
    info!("Remote address is: {}", remote_addr);
 | 
			
		||||
 | 
			
		||||
    let tun_local: Ipv4Addr = matches
 | 
			
		||||
        .value_of("tun_local")
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,7 @@ async fn main() {
 | 
			
		||||
        .expect("bad remote address or host")
 | 
			
		||||
        .next()
 | 
			
		||||
        .expect("unable to resolve remote host name");
 | 
			
		||||
    info!("Remote address is: {}", remote_addr);
 | 
			
		||||
 | 
			
		||||
    let tun_local: Ipv4Addr = matches
 | 
			
		||||
        .value_of("tun_local")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user