|
1 | 1 | # minivtun-rs |
2 | | -A Rust implementation of [minivtun](https://github.com/rssnsj/minivtun). |
| 2 | +A Rust implementation of [minivtun](https://github.com/rssnsj/minivtun), with hole punching supported by [rndz](https://github.com/optman/rndz). |
3 | 3 |
|
4 | 4 | ### Usage |
5 | 5 | ``` |
6 | | -minivtun-rs 0.1 |
| 6 | +minivtun-rs 0.1.5 |
7 | 7 | Mini virtual tunneller in non-standard protocol |
8 | 8 |
|
9 | 9 | USAGE: |
10 | 10 | minivtun-rs [FLAGS] [OPTIONS] |
11 | 11 |
|
12 | 12 | FLAGS: |
13 | | - -d, --daemon run as daemon process |
14 | | - -h, --help Prints help information |
15 | | - -V, --version Prints version information |
| 13 | + -d, --daemon run as daemon process |
| 14 | + -h, --help Prints help information |
| 15 | + -i, --info view current tunnel inf |
| 16 | + --rebind rebind socket before reconnect |
| 17 | + -V, --version Prints version information |
| 18 | + -w, --wait-dns wait for DNS resolve ready after service started |
16 | 19 |
|
17 | 20 | OPTIONS: |
18 | | - -F, --fwmark <fwmark_num> fwmark set on vpn traffic |
19 | | - -n, --ifname <ifname> virtual interface name |
20 | | - -a, --ipv4-addr <tun_lip/prf_len> pointopoint IPv4 pair of the virtual interface |
| 21 | + --client-timeo <N> maximum inactive time (seconds) before client timeout [default: 120] |
| 22 | + -F, --fwmark <fwmark_num> fwmark set on vpn traffic |
| 23 | + -n, --ifname <ifname> virtual interface name |
| 24 | + -a, --ipv4-addr <tun_lip/prf_len> pointopoint IPv4 pair of the virtual interface |
21 | 25 | -A, --ipv6-addr <tun_ip6/pfx_len> |
22 | | - -K, --keepalive <N> seconds between keep-alive tests, default:7 |
23 | | - -e, --key <encryption_key> shared password for data encryption |
24 | | - -l, --local <ip:port> local IP:port for server to listen |
25 | | - -M, --metric <metric> metric of attached routes |
26 | | - -m, --mtu <mtu> set MTU size, default:1300 |
27 | | - -R, --reconnect-timeo <N> maximum inactive time (seconds) before reconnect, default:47 |
28 | | - -r, --remote <host:port> host:port of server to connect (brace with [] for bare IPv6) |
29 | | - -v, --route <network/prefix[=gw>... attached IPv4/IPv6 route on this link, can be multiple |
30 | | - -T, --table <table_name> route table of the attached routes |
31 | | - -t, --type <encryption_type> encryption type(aes-128, aes-256), default:aes-128 |
| 26 | + -K, --keepalive <N> seconds between keep-alive tests [default: 7] |
| 27 | + -e, --key <encryption_key> shared password for data encryption |
| 28 | + -l, --local <ip:port> local IP:port for server to listen |
| 29 | + -M, --metric <metric> metric of attached routes |
| 30 | + -m, --mtu <mtu> mtu size [default: 1300] |
| 31 | + -R, --reconnect-timeo <N> maximum inactive time (seconds) before reconnect [default: 47] |
| 32 | + -r, --remote <host:port> host:port of server to connect (brace with [] for bare IPv6) |
| 33 | + --rndz-local-id <rndz_local_id> rndz local id |
| 34 | + --rndz-remote-id <rndz_remote_id> rndz remote id |
| 35 | + --rndz-server <rndz_server> rndz server address |
| 36 | + -v, --route <network/prefix[=gw>... attached IPv4/IPv6 route on this link, can be multiple |
| 37 | + -T, --table <table_name> route table of the attached routes |
| 38 | + -t, --type <encryption_type> encryption type [default: aes-128] [possible values: plain, aes-128, aes- |
| 39 | + 256] |
| 40 | +
|
| 41 | +``` |
| 42 | +#### quick start |
| 43 | + |
| 44 | +server |
| 45 | +``` |
| 46 | +minivtun-rs -l 0.0.0.0:1234 -a 10.0.0.1/24 -e helloworld |
| 47 | +``` |
| 48 | + |
| 49 | +client |
| 50 | +``` |
| 51 | +minivtun-rs -r {SERVERADDR}:1234 -a 10.0.0.2/24 -e helloworld |
| 52 | +``` |
| 53 | + |
| 54 | +view status |
32 | 55 | ``` |
| 56 | +minivtun-rs -i |
| 57 | +``` |
| 58 | + |
| 59 | +#### hole punching setup example |
| 60 | + |
| 61 | +server |
| 62 | +``` |
| 63 | +minivtun-rs --rndz_server rndz.optman.net:8888 --rndz-local-id {SERVERNAME} -a 10.0.0.1/24 -e helloworld |
| 64 | +``` |
| 65 | + |
| 66 | +client |
| 67 | +``` |
| 68 | +minivtun-rs --rndz_server rndz.optman.net:8888 --rndz-remote-id {SERVERNAME} --rndz-local-id {LOCALNAME} -a 10.0.0.2/24 -e helloworld |
| 69 | +``` |
| 70 | + |
33 | 71 |
|
0 commit comments