pub async fn wait_started(&self, timeout: Duration) -> bool {
        // Only test started with TCP connect()
        // XXX: Is there an easy way to test if UDP port was listening? (no ICMP!)
        if !self.mode.enable_tcp() {
            return true;
        }

        let start_time = Instant::now();

        loop {
            let now_time = Instant::now();
            let elapsed_time = now_time - start_time;
            if elapsed_time >= timeout {
                return false;
            }

            let remain_time = timeout - elapsed_time;

            match time::timeout(remain_time, TcpStream::connect(self.local_addr)).await {
                Ok(Ok(..)) => {
                    return true;
                }
                Ok(Err(..)) => {}
                Err(..) => {
                    return false;
                }
            }
        }
    }
Check if plugin have been started
crates/shadowsocks/src/plugin/mod.rs