ashi009 / bestroutetb

Generating the most optimized route table for VPN users.
MIT License
879 stars 99 forks source link

Add multi gw support. #35

Open PhoenixHe-NV opened 8 years ago

PhoenixHe-NV commented 8 years ago

Test cli:

node ./cli.js -v -p custom \
    --rule-format $'r a %prefix/%length %gw table vpn\n' \
    --route.net="CN" \
    --gateway.net="via 172.27.0.1 dev eth0" \
    --route.vpn="US" \
    --gateway.vpn="via 172.27.0.2 dev eth1" \
    --route.jp="JP" \
    --gateway.jp="via 172.27.0.3 dev eth2" \
    -f -o a/vpn_route.sh --header \
"#!/bin/bash
PATH=/usr/sbin:$PATH
ip route flush table vpn

ip -b - <<FILE
" \
--footer \
"FILE
"
ashi009 commented 8 years ago

Thanks for the contribution. I'll look into it this weekend.

PhoenixHe-NV commented 8 years ago

Well... I think pull request #14 works better. You can close this one.