zmack / rust-socks Goto Github PK
View Code? Open in Web Editor NEWSocks5 server written in rust
Socks5 server written in rust
hi.
root@racknerd-7b97d8:~/rust-socks# cargo build --release
Downloaded log v0.3.6
Downloaded byteorder v0.5.3
Downloaded 2 crates (24.8 KB) in 0.25s
Compiling byteorder v0.5.3
Compiling log v0.3.6
Compiling rust-socks v0.0.1 (/root/rust-socks)
error[E0432]: unresolved import std::net::lookup_host
--> src/dns_cache.rs:1:5
|
1 | use std::net::lookup_host;
| ^^^^^^^^^^^^^^^^^^^^^ no lookup_host
in net
warning: unused import: std::os
--> src/main.rs:6:5
|
6 | use std::os;
| ^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
warning: unused imports: error
, io
--> src/main.rs:7:11
|
7 | use std::{io, error};
| ^^ ^^^^^
warning: unused import: TcpStream
--> src/main.rs:8:29
|
8 | use std::net::{TcpListener, TcpStream};
| ^^^^^^^^^
warning: unused import: std::time::Duration
--> src/main.rs:9:5
|
9 | use std::time::Duration;
| ^^^^^^^^^^^^^^^^^^^
warning: unused import: ClientTracker
--> src/main.rs:15:22
|
15 | use client_tracker::{ClientTracker, ClientTrackers};
| ^^^^^^^^^^^^^
warning: unused imports: Ipv4Addr
, SocketAddr
--> src/configuration.rs:6:24
|
6 | use std::net::{IpAddr, Ipv4Addr, SocketAddr};
| ^^^^^^^^ ^^^^^^^^^^
warning: unused import: std::fs::File
--> src/client_tracker.rs:2:5
|
2 | use std::fs::File;
| ^^^^^^^^^^^^^
warning: unused import: std::os
--> src/server.rs:3:5
|
3 | use std::os;
| ^^^^^^^
warning: unused imports: error
, io
--> src/server.rs:4:11
|
4 | use std::{io, error};
| ^^ ^^^^^
warning: unused import: TcpListener
--> src/server.rs:6:16
|
6 | use std::net::{TcpListener, TcpStream, Shutdown};
| ^^^^^^^^^^^
warning: unused import: IpAddr
--> src/server.rs:9:16
|
9 | use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4};
| ^^^^^^
warning: unused import: ClientTracker
--> src/server.rs:14:22
|
14 | use client_tracker::{ClientTracker, ClientTrackers};
| ^^^^^^^^^^^^^
warning: unused import: configuration::Configuration
--> src/server.rs:15:5
|
15 | use configuration::Configuration;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: LittleEndian
, WriteBytesExt
--> src/server.rs:17:36
|
17 | use server::byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt};
| ^^^^^^^^^^^^ ^^^^^^^^^^^^^
warning: unreachable statement
--> src/logger.rs:41:9
|
32 | / loop {
33 | | match rx.recv() {
34 | | Ok(Msg::Log(message)) => {
35 | | println!("Got {}", message);
... |
39 | | }
40 | | }
| |_________- any code following this expression is unreachable
41 | file.flush();
| ^^^^^^^^^^^^^ unreachable statement
|
= note: #[warn(unreachable_code)]
on by default
For more information about this error, try rustc --explain E0432
.
warning: rust-socks
(bin "rust-socks") generated 15 warnings
error: could not compile rust-socks
due to previous error; 15 warnings emitted
root@racknerd-7b97d8:~/rust-socks#
how to fix them?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.