captive-browser icon indicating copy to clipboard operation
captive-browser copied to clipboard

How to use bind to device feature

Open sammoth opened this issue 6 years ago • 2 comments

Thanks for this great tool. I am trying to use the bind to device feature but I am not sure I am understanding how to use it correctly. First it doesn't work, as expected: Failed to bind to "wlp2s0": operation not permitted

So I tried giving the binary cap_net_raw capability by running sudo setcap cap_net_raw+ep /home/sam/go/bin/captive-browser

However now when running captive-browser I get a segfault:

[33265.647116] captive-browser[21369]: segfault at ffffffffff600000 ip ffffffffff600000 sp 00007ffd183d3f88 error 15
[33265.647117] Code: Bad RIP value.

Alternatively I could run captive-browser using sudo? Is that advisable - would it try to run chromium as root? Would it make sense for captive-browser to only run its proxy using sudo so that chromium doesn't have to be run as root?

I tried running using sudo -E anyway but the program still looks for configuration in the root home folder:

2019/05/08 17:34:17 Failed to read config: open /root/.config/captive-browser.toml: no such file or directory

sammoth avatar May 08 '19 10:05 sammoth

/cc @volth

FiloSottile avatar Jun 01 '19 13:06 FiloSottile