| keepalive | integer | --keepalive | seconds between heartbeats (default: 10) |
| snmplog | string | --snmplog | collect snmp to file, aware of timeformat in golang, like: ./snmp-20060102.log |
| snmpperiod | integer | --snmpperiod | snmp collect period, in seconds (default: 60) |
+| tcp | boolean | --tcp | to emulate a TCP connection(linux), need root privilege |
| quiet | boolean | --quiet | suppress the 'stream open/close' messages |
| gogc | integer | | set GOGC environment variable, see [Memory Control](https://github.com/xtaci/kcptun#memory-control). |
| syslog | boolean | | redirect logs to syslog when set to 1, implemented by [procd](https://openwrt.org/docs/guide-developer/procd-init-scripts#service_parameters). (default: 0) |
[ -z "$keepalive" ] || json_add_int keepalive "$keepalive"
[ -z "$snmplog" ] || json_add_string snmplog "$snmplog"
[ -z "$snmpperiod" ] || json_add_int snmpperiod "$snmpperiod"
+ json_add_boolean tcp "$tcp"
json_add_boolean quiet "$quiet"
json_dump -i > "$confjson"
'keepalive:uinteger' \
'snmplog:string' \
'snmpperiod:uinteger' \
+ 'tcp:bool' \
'quiet:bool' \
'gogc:uinteger' \
'syslog:bool:1' \