
Ask HN: How do you set up a virtual browser - appleflaxen
When you need to do something on your computer that might be risky (like run a suspect executable) you can use a VM and feel comfortable safe in your ability to isolate it.<p>But how do you isolate your browser? There are so many cookies and identity bits in it that I want a bare-bones profile. It would be similar to the chrome-new command that someone posted previously, but it would let me pack in the non-identity parts of my experience:<p>- don&#x27;t offer to save any passwords<p>- prompt for location on every download<p>- use the following ten search shortcuts<p>and maybe install an ad blocker (contains identiny information, but not much).<p>Is this possible short of using something like chrome-driver? Like can I create a temp profile, then a bash script to copy it to a new location every time I run the browser and use the blank copy?<p>Thanks in advance for any insight you might have.
======
hotdox
I use next script. It creates temporarily dir for firefox, uses it as a
profile dir and remove after firefox closed.

    
    
       #!/bin/sh -e
       DIR="${XDG_CACHE_HOME:-$HOME/.cache}"
       mkdir -p -- "$DIR"
       TEMP="$(mktemp -d -- "$DIR/firefox-XXXXXX")"
       trap "rm -rf -- '$TEMP'" INT TERM EXIT
       wget 'https://raw.githubusercontent.com/pyllyukko/user.js/master/user.js' -O "$TEMP/user.js"
       firefox -profile "$TEMP" -no-remote "$@"
    

It also uses very hardened options from
[https://github.com/pyllyukko/user.js](https://github.com/pyllyukko/user.js)

It is not my invention, but I lost a link to blog post

~~~
hotdox
Another alternative would be
[https://www.torproject.org/download/](https://www.torproject.org/download/)

------
yamrzou
If security is your concern, you can run the browser inside a container:
[https://github.com/ConSol/docker-headless-vnc-
container](https://github.com/ConSol/docker-headless-vnc-container)

You can also use:
[https://browsergap.dosyago.com/](https://browsergap.dosyago.com/)

There is also:
[https://firejail.wordpress.com/](https://firejail.wordpress.com/)

------
nickphx
Check out browsergap
[https://github.com/dosyago/BrowserFace](https://github.com/dosyago/BrowserFace)

------
gen3
Firefox has a bunch of setting like deleting cookies and history on close that
can be configured. I find that hard to use as a daily driver. For me, Firefox
containers and uBlock origin works well enough.

If you do want to do some auto config thing, I think it’s possible. Owasp ZAP
has a button that auto configs a session with a whole bunch of features
changed. It might be worth looking into how they do that. There is command
line flags.

------
gitgud
Is there a problem with "Incognito Mode"?

Modern browsers (Chromium and Firefox) are pretty well isolated as far as
sand-boxing goes (compared to 15 years ago anyway).

But if you really want to avoid advanced finger-printing and tracking, then
you really need to use a VPN or TOR. As sites can track your IP, OS, Browser,
screen dimensions... etc

~~~
appleflaxen
thanks for mentioning this. i don't really trust google on incognito mode. G
will hide my identity from others, but it knows all my surfing habits,
including anywhere I go with incognito.

