|
|
ab432b |
From a96d8a17e57343ff29736a2f8d0c954f2c4ba02a Mon Sep 17 00:00:00 2001
|
|
|
ab432b |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
ab432b |
Date: Tue, 18 Sep 2012 15:32:31 +0200
|
|
|
ab432b |
Subject: [PATCH] rewrite: add default "ddg" dumb/smart prefixes for DuckDuckGo
|
|
|
ab432b |
|
|
|
ab432b |
... and mention that URI rewriting rules may leak ELinks' identity
|
|
|
ab432b |
in the documentation of protocol.http.user_agent.
|
|
|
ab432b |
|
|
|
ab432b |
Originally requested at <https://bugzilla.redhat.com/856348>.
|
|
|
ab432b |
---
|
|
|
ab432b |
src/protocol/http/http.c | 3 ++-
|
|
|
ab432b |
src/protocol/rewrite/rewrite.c | 2 ++
|
|
|
ab432b |
2 files changed, 4 insertions(+), 1 deletions(-)
|
|
|
ab432b |
|
|
|
ab432b |
diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c
|
|
|
ab432b |
index ce14031..98053c0 100644
|
|
|
ab432b |
--- a/src/protocol/http/http.c
|
|
|
ab432b |
+++ b/src/protocol/http/http.c
|
|
|
ab432b |
@@ -227,7 +227,8 @@ static union option_info http_options[] = {
|
|
|
ab432b |
"pushing some lite version to them automagically.\n"
|
|
|
ab432b |
"\n"
|
|
|
ab432b |
"Use \" \" if you don't want any User-Agent header to be sent "
|
|
|
ab432b |
- "at all.\n"
|
|
|
ab432b |
+ "at all. URI rewriting rules may still include parameters "
|
|
|
ab432b |
+ "that reveal you are using ELinks.\n"
|
|
|
ab432b |
"\n"
|
|
|
ab432b |
"%v in the string means ELinks version,\n"
|
|
|
ab432b |
"%s in the string means system identification,\n"
|
|
|
ab432b |
diff --git a/src/protocol/rewrite/rewrite.c b/src/protocol/rewrite/rewrite.c
|
|
|
ab432b |
index dd5c7ab..e01da74 100644
|
|
|
ab432b |
--- a/src/protocol/rewrite/rewrite.c
|
|
|
ab432b |
+++ b/src/protocol/rewrite/rewrite.c
|
|
|
ab432b |
@@ -121,6 +121,7 @@ static union option_info uri_rewrite_options[] = {
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("cia", "http://cia.navi.cx/"),
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("b", "http://babelfish.altavista.com/babelfish/tr"),
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org"),
|
|
|
ab432b |
+ INIT_OPT_DUMB_PREFIX("ddg", "http://duckduckgo.com/?t=elinks"),
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("g", "http://www.google.com/"),
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("gg", "http://www.google.com/"),
|
|
|
ab432b |
INIT_OPT_DUMB_PREFIX("go", "http://www.google.com/"),
|
|
|
ab432b |
@@ -158,6 +159,7 @@ static union option_info uri_rewrite_options[] = {
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("cambridge", "http://dictionary.cambridge.org/results.asp?searchword=%s"),
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/admin/search?words=%s"),
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
|
|
|
ab432b |
+ INIT_OPT_SMART_PREFIX("ddg", "http://duckduckgo.com/?q=%s&t=elinks"),
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("dmoz", "http://search.dmoz.org/cgi-bin/search?search=%s"),
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("foldoc", "http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?%s"),
|
|
|
ab432b |
INIT_OPT_SMART_PREFIX("g", "http://www.google.com/search?q=%s&btnG=Google+Search"),
|
|
|
ab432b |
--
|
|
|
ab432b |
1.7.1
|
|
|
ab432b |
|