diff --git a/vsock_proxy/src/lib.rs b/vsock_proxy/src/lib.rs index 2a455dcb4..88d18a9c4 100644 --- a/vsock_proxy/src/lib.rs +++ b/vsock_proxy/src/lib.rs @@ -1,7 +1,7 @@ // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -pub mod starter; +pub mod proxy; pub mod dns; use std::net::IpAddr; diff --git a/vsock_proxy/src/main.rs b/vsock_proxy/src/main.rs index 4c84d79a9..44f524ac0 100644 --- a/vsock_proxy/src/main.rs +++ b/vsock_proxy/src/main.rs @@ -10,7 +10,7 @@ use clap::{App, AppSettings, Arg}; use env_logger::init; use log::info; -use vsock_proxy::{starter::Proxy, IpAddrType, VsockProxyResult}; +use vsock_proxy::{proxy::Proxy, IpAddrType, VsockProxyResult}; fn main() -> VsockProxyResult<()> { init(); diff --git a/vsock_proxy/src/starter.rs b/vsock_proxy/src/proxy.rs similarity index 100% rename from vsock_proxy/src/starter.rs rename to vsock_proxy/src/proxy.rs diff --git a/vsock_proxy/tests/connection_test.rs b/vsock_proxy/tests/connection_test.rs index 39577de22..f333cc35d 100644 --- a/vsock_proxy/tests/connection_test.rs +++ b/vsock_proxy/tests/connection_test.rs @@ -11,10 +11,10 @@ use std::thread; use tempfile::NamedTempFile; use vsock::{VsockAddr, VsockStream}; -use vsock_proxy::{starter::Proxy, IpAddrType}; +use vsock_proxy::{proxy::Proxy, IpAddrType}; fn vsock_connect(port: u32) -> VsockStream { - let sockaddr = VsockAddr::new(vsock_proxy::starter::VSOCK_PROXY_CID, port); + let sockaddr = VsockAddr::new(vsock_proxy::proxy::VSOCK_PROXY_CID, port); VsockStream::connect(&sockaddr).expect("Could not connect") } @@ -30,7 +30,7 @@ fn test_tcp_connection() { ) .unwrap(); let proxy = Proxy::new( - vsock_proxy::starter::VSOCK_PROXY_PORT, + vsock_proxy::proxy::VSOCK_PROXY_PORT, &addr, 9000, 2, @@ -72,7 +72,7 @@ fn test_tcp_connection() { // Start client that connects to proxy on port 8000 vsock let client_handle = thread::spawn(move || { - let mut stream = vsock_connect(vsock_proxy::starter::VSOCK_PROXY_PORT); + let mut stream = vsock_connect(vsock_proxy::proxy::VSOCK_PROXY_PORT); // Write request stream.write_all(b"client2server").expect("client write");