Files
wlan-ap/feeds/ucentral/uspot/files/config
John Crispin baaa31f445 uspot: add advanced captive http components
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00

37 lines
1.8 KiB
Plaintext

ubus call spotfilter interface_add '{ "name": "hotspot", "devices": [ "wlancaptive0", "wlancaptive1" ], "config": { "default_class": 1, "default_dns_class": 0, "class": [ { "index": 0, "device_macaddr": "up0v0", "fwmark": 1,"fwmark_mask": 127}, { "index": 1, "fwmark": 2,"fwmark_mask": 127 }] } }'
ubus call spotfilter interface_add '{ "name": "hotspot", "devices": [ "wlan0" ], "config": { "class": [ { "index": 0, "device_macaddr": "up0v0", "fwmark": 1,"fwmark_mask": 127}, { "index": 1, "fwmark": 2,"fwmark_mask": 127 }] } }'
ubus call spotfilter interface_add '{ "name": "hotspot", "devices": [ "wlan1" ], "config": { "class": [ { "index": 0, "device_macaddr": "up0v0", "fwmark": 1,"fwmark_mask": 127}, { "index": 1, "fwmark": 2,"fwmark_mask": 127 }] } }'
ubus call spotfilter client_set '{"interface":"hotspot", "address": "1c:57:dc:37:3c:b1", "state": 0, "dns_state": 1}'
ubus call spotfilter client_set '{"interface":"hotspot", "address": "e8:a7:30:a0:9c:6e", "state": 0, "dns_state": 1}'
ubus call spotfilter client_get '{"interface":"hotspot", "address": "1e:07:4c:c0:89:a7", "state": 0, "dns_state": 1}'
ubus call spotfilter client_set '{"interface":"hotspot", "address": "e8:a7:30:a0:9c:6e", "state": 0, "dns_state": 1}'
ubus call spotfilter client_get '{"interface":"hotspot", "address": "1c:57:dc:37:3c:b1", "state": 0, "dns_state": 1}'
config redirect
option name 'HTTP-Redirect'
option src up0v0
option src_dport 80
option proto tcp
option target DNAT
option mark 1/127
config rule
option name 'Allow-captive-up0v0'
option src 'up0v0'
option dest_port '80'
option proto 'tcp'
option mark 2/127
option target 'ACCEPT'
config rule
option name 'Allow-captive-up0v0'
option src 'up0v0'
option dest_port '80'
option proto 'tcp'
option mark 1/127
option target 'ACCEPT'