FiloSottile / FiloSottile/captive-browser

How to use bind to device feature

Open
#16 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
482
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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:

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.