Closed riobard closed 9 years ago
支持。 最好luci-app也能对应一下。
直接修改conf和scripts就可以了,luci-app只需要加一个选项并修改一下init script,shadowvpn的源码不需要做修改(只是启动时会提示"warning: unknown key in config file: %s", key)
Actually we can do this in current version. Because shadowvpn simply passes all the key value pairs to the shell script.
@clowwindy Ah! My bad. I was confused by the warnings generated by https://github.com/clowwindy/ShadowVPN/blob/master/src/args.c#L184 and thought it didn't allow me to do so (despite the comments in the sample shell scripts).
If this is the intended behavior, is there any plan to get rid of that warning message?
The message still helps users find typos. Maybe we could use the following:
warning: config key XXX not recognized by shadowvpn, will be passed to shell scripts anyway
That would be nice :)
In addition to existing keys, we should add the following three (optional?) keys to config file
So that
client_up.sh
andserver_up.sh
can refer to those keys like thisThen multiple instances of ShadowVPN clients/servers can share the same pair of up/down scripts.