heiher / hev-socks5-tunnel

A high-performance tun2socks for Linux/Android/FreeBSD/macOS/iOS/WSL2 (IPv4/IPv6/TCP/UDP)
MIT License
636 stars 130 forks source link

Tun create callback #86

Closed SaeedDev94 closed 4 months ago

SaeedDev94 commented 4 months ago

I'm writing a bash script to do the tasks automatically Here I have a small problem I want to handle routing after tun created and since tun2socks is a blocking command I can't do it In other variants of tun2socks like xjasonlyu/tun2socks we can pass a bash script via -tun-post-up and handle routing after tun created, how can we do the same thing here?

heiher commented 4 months ago

Fixed: https://github.com/heiher/hev-socks5-tunnel/commit/91a133d849f69aabd3c620f01fe0a16a0f7cb63c

Usage

tunnel:
  # Post up script (optional)
  post-up-script: up.sh
  # Pre down script (optional)
  pre-down-script: down.sh