summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/fetchers/curl.c5
-rw-r--r--desktop/options.h3
-rw-r--r--gtk/dialogs/preferences.c12
-rw-r--r--gtk/res/options.gtk3.ui32
-rw-r--r--resources/FatMessages6
5 files changed, 55 insertions, 3 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index ed4c75952..ca89c95de 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -613,11 +613,16 @@ fetch_curl_set_options(struct curl_fetch_info *f)
SETOPT(CURLOPT_USERPWD, NULL);
}
+ /* set up proxy options */
if (nsoption_bool(http_proxy) &&
(nsoption_charp(http_proxy_host) != NULL) &&
(strncmp(nsurl_access(f->url), "file:", 5) != 0)) {
SETOPT(CURLOPT_PROXY, nsoption_charp(http_proxy_host));
SETOPT(CURLOPT_PROXYPORT, (long) nsoption_int(http_proxy_port));
+
+ /* setup the omission list */
+ SETOPT(CURLOPT_NOPROXY, nsoption_charp(http_proxy_noproxy));
+
if (nsoption_int(http_proxy_auth) != OPTION_HTTP_PROXY_AUTH_NONE) {
SETOPT(CURLOPT_PROXYAUTH,
nsoption_int(http_proxy_auth) ==
diff --git a/desktop/options.h b/desktop/options.h
index 79566184b..391dfbc08 100644
--- a/desktop/options.h
+++ b/desktop/options.h
@@ -56,6 +56,9 @@ NSOPTION_STRING(http_proxy_auth_user, NULL)
/** Proxy authentication password */
NSOPTION_STRING(http_proxy_auth_pass, NULL)
+/** Proxy omission list */
+NSOPTION_STRING(http_proxy_noproxy, "localhost")
+
/** Default font size / 0.1pt. */
NSOPTION_INTEGER(font_size, 128)
diff --git a/gtk/dialogs/preferences.c b/gtk/dialogs/preferences.c
index f17f1ccb0..0669f8d9f 100644
--- a/gtk/dialogs/preferences.c
+++ b/gtk/dialogs/preferences.c
@@ -45,6 +45,7 @@ struct ppref {
GtkEntry *entryProxyHost;
GtkEntry *entryProxyUser;
GtkEntry *entryProxyPassword;
+ GtkEntry *entryProxyNoproxy;
GtkSpinButton *spinProxyPort;
/* dynamic list stores */
@@ -200,6 +201,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
gboolean port;
gboolean user;
gboolean pass;
+ gboolean noproxy;
switch (proxyval) {
case 0: /* no proxy */
@@ -207,6 +209,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
port = FALSE;
user = FALSE;
pass = FALSE;
+ noproxy = FALSE;
break;
case 1: /* proxy with no auth */
@@ -214,6 +217,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
port = TRUE;
user = FALSE;
pass = FALSE;
+ noproxy = TRUE;
break;
case 2: /* proxy with basic auth */
@@ -221,6 +225,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
port = TRUE;
user = TRUE;
pass = TRUE;
+ noproxy = TRUE;
break;
case 3: /* proxy with ntlm auth */
@@ -228,6 +233,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
port = TRUE;
user = TRUE;
pass = TRUE;
+ noproxy = TRUE;
break;
case 4: /* system proxy */
@@ -235,6 +241,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
port = FALSE;
user = FALSE;
pass = FALSE;
+ noproxy = FALSE;
break;
default:
@@ -245,6 +252,7 @@ static void set_proxy_widgets_sensitivity(int proxyval, struct ppref *priv)
gtk_widget_set_sensitive(GTK_WIDGET(priv->spinProxyPort), port);
gtk_widget_set_sensitive(GTK_WIDGET(priv->entryProxyUser), user);
gtk_widget_set_sensitive(GTK_WIDGET(priv->entryProxyPassword), pass);
+ gtk_widget_set_sensitive(GTK_WIDGET(priv->entryProxyNoproxy), noproxy);
}
@@ -322,6 +330,9 @@ ENTRY_SIGNALS(entryProxyUser, http_proxy_auth_user)
/* password */
ENTRY_SIGNALS(entryProxyPassword, http_proxy_auth_pass)
+/* no proxy */
+ENTRY_SIGNALS(entryProxyNoproxy, http_proxy_noproxy)
+
/* Fetching */
/* maximum fetchers */
@@ -1069,6 +1080,7 @@ GtkWidget* nsgtk_preferences(struct browser_window *bw, GtkWindow *parent)
priv->spinProxyPort = GB(SPIN_BUTTON, spinProxyPort);
priv->entryProxyUser = GB(ENTRY, entryProxyUser);
priv->entryProxyPassword = GB(ENTRY, entryProxyPassword);
+ priv->entryProxyNoproxy = GB(ENTRY, entryProxyNoproxy);
#undef GB
/* connect all signals ready to use */
diff --git a/gtk/res/options.gtk3.ui b/gtk/res/options.gtk3.ui
index 233825c88..a795c2bf5 100644
--- a/gtk/res/options.gtk3.ui
+++ b/gtk/res/options.gtk3.ui
@@ -2002,7 +2002,7 @@
<object class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
@@ -2175,6 +2175,36 @@
<property name="bottom_attach">4</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label55">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">preferencesProxyNoproxy</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="entryProxyNoproxy">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">preferencesProxyNoproxyTooltip</property>
+ <property name="caps_lock_warning">False</property>
+ <signal name="changed" handler="nsgtk_preferences_entryProxyNoproxy_changed" swapped="no"/>
+ <signal name="realize" handler="nsgtk_preferences_entryProxyNoproxy_realize" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/resources/FatMessages b/resources/FatMessages
index 82c64ce9c..d25af013f 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2182,11 +2182,13 @@ en.gtk.preferencesProxyType:Proxy type
en.gtk.preferencesProxyHost:Host
en.gtk.preferencesProxyUsername:Username
en.gtk.preferencesProxyPassword:Password
+en.gtk.preferencesProxyNoproxy:No Proxy For
en.gtk.preferencesProxyTypeTooltip:The type of HTTP proxy server.
en.gtk.preferencesProxyHostTooltip:Host name of your proxy server.
en.gtk.preferencesProxyPortTooltip:Port number to connect to on proxy server.
-en.gtk.preferencesProxyUsernameTooltip:Username to access the proxy
-en.gtk.preferencesProxyPasswordTooltip:Password to access the proxy
+en.gtk.preferencesProxyUsernameTooltip:Username to access the proxy.
+en.gtk.preferencesProxyPasswordTooltip:Password to access the proxy.
+en.gtk.preferencesProxyNoproxyTooltip:Comma separated list of host names that should not be proxied.
en.gtk.preferencesFetching:<b>Fetching</b>
en.gtk.preferencesFetchingMax:Maximum fetchers
en.gtk.preferencesFetchingPerhost:Fetches per host