surf

Surf web browser.
git clone git://r-36.net/surf
Log | Files | Refs | README | LICENSE

commit 4d5a7f07ccc453c8e3a2f83b8015ebe34282f64d
parent cef886fc3a6bb4a22fd8109c85d69ced25df9283
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 20 Apr 2017 22:43:28 +0200

Reshuffle config.def.h.

* User-Agent is now » «. This has the lowest fingerprint value.
* Accept headers are now adapted to a low fingerprint value.
* diskcache is a soup feature.

Diffstat:
config.def.h | 44++++++++++++++++++++++++++++++++++++--------
1 file changed, 36 insertions(+), 8 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,12 +1,12 @@ -/* modifier 0 means no modifier */ -static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) " - "AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 " - "Safari/537.15 Surf/"VERSION; +/* Welcome to Surf! */ + +/* Path configuration */ static char *scriptfile = "~/.surf/script.js"; static char *styledir = "~/.surf/styles/"; static char *cachefolder = "~/.surf/cache/"; static char *dbfolder = "~/.surf/databases/"; +/* visual options */ static Bool kioskmode = FALSE; /* Ignore shortcuts */ static Bool showindicators = TRUE; /* Show indicators in window title */ static Bool zoomto96dpi = TRUE; /* Zoom pages to always emulate 96dpi */ @@ -23,12 +23,12 @@ static char *cafile = "/etc/ssl/certs/ca-certificates.crt"; static Bool strictssl = TRUE; /* strict means if untrusted SSL/TLS * connections should be refused. */ static time_t sessiontime = 3600; +static Bool enablediskcache = TRUE; +static int diskcachebytes = 5 * 1024 * 1024; /* Webkit default features */ static Bool enablescrollbars = TRUE; static Bool enablespatialbrowsing = TRUE; -static Bool enablediskcache = TRUE; -static int diskcachebytes = 5 * 1024 * 1024; static Bool enableplugins = TRUE; static Bool enablescripts = TRUE; static Bool enableinspector = TRUE; @@ -37,10 +37,38 @@ static Bool loadimages = TRUE; static Bool hidebackground = FALSE; static Bool allowgeolocation = TRUE; +/* + * Now on TV: »What is the best User-Agent for me?« + * Result: None. + */ +char *useragent = NULL; +/* + * These are for the case some incompetent »web programmer« decided for you + * what is best for you. + */ +/* +static char *useragent = "Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) " + "Gecko/41.0 Firefox/41.0"; +static char *useragent = "Mozilla/5.0 (X11; Linux x86_64) " + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.19 " + "Safari/537.36"; +static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) " + "AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 " + "Safari/537.15 Surf/"VERSION; +*/ + /* custom http headers */ static HttpHeader customheaders[] = { - /* key value */ - { "DNT", "1" }, + /* key, value */ + /* Do-Not-Track. Haha! */ + { "DNT", "1" }, + /* Best User-Agent ever. */ + { "User-Agent", " "}, + /* We are a damn US imperialist. Change to cn, once Chinese communism + * has won.*/ + { "Accept-Language", "en-US,en;q=0.5" }, + { "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, + { "Accept-Encoding", "gzip, deflate" }, }; #define PROMPT_GOTO "Go To"