mirror of
https://github.com/dndx/phantun.git
synced 2025-11-26 22:55:34 +08:00
@@ -153,6 +153,8 @@ async fn main() -> io::Result<()> {
|
|||||||
|
|
||||||
let tun = TunBuilder::new()
|
let tun = TunBuilder::new()
|
||||||
.name(tun_name) // if name is empty, then it is set by kernel.
|
.name(tun_name) // if name is empty, then it is set by kernel.
|
||||||
|
.tap(false)
|
||||||
|
.packet_info(false)
|
||||||
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
||||||
.address(tun_local)
|
.address(tun_local)
|
||||||
.destination(tun_peer)
|
.destination(tun_peer)
|
||||||
|
|||||||
@@ -152,6 +152,8 @@ async fn main() -> io::Result<()> {
|
|||||||
|
|
||||||
let tun = TunBuilder::new()
|
let tun = TunBuilder::new()
|
||||||
.name(tun_name) // if name is empty, then it is set by kernel.
|
.name(tun_name) // if name is empty, then it is set by kernel.
|
||||||
|
.tap(false)
|
||||||
|
.packet_info(false)
|
||||||
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
||||||
.address(tun_local)
|
.address(tun_local)
|
||||||
.destination(tun_peer)
|
.destination(tun_peer)
|
||||||
|
|||||||
Reference in New Issue
Block a user