aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--fm.h8
-rw-r--r--main.c10
-rw-r--r--rc.c16
-rw-r--r--url.c29
5 files changed, 63 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 386d7da..1a3d727 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2002-11-15 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03429] https proxy
+ * fm.h (HTTPS_proxy): added
+ (HTTPS_proxy_parsed): added
+ * main.c (main): check https_proxy
+ * rc.c (CMT_HTTPS_PROXY): added
+ (https_proxy): added
+ (parse_proxy): HTTPS_proxy
+ * url.c (openURL): for HTTPS, use HTTPS_proxy
+ (schemeToProxy): HTTPS_proxy_parsed
+
2002-11-14 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03428] install manual as w3m.exe.1 on Cygwin
@@ -4621,4 +4633,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.510 2002/11/13 15:53:44 ukai Exp $
+$Id: ChangeLog,v 1.511 2002/11/14 16:56:22 ukai Exp $
diff --git a/fm.h b/fm.h
index 305a632..5e63e24 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.75 2002/11/11 15:33:35 ukai Exp $ */
+/* $Id: fm.h,v 1.76 2002/11/14 16:56:23 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -745,11 +745,17 @@ extern unsigned char PcKeymap[];
extern FuncList w3mFuncList[];
global char *HTTP_proxy init(NULL);
+#ifdef USE_SSL
+global char *HTTPS_proxy init(NULL);
+#endif /* USE_SSL */
#ifdef USE_GOPHER
global char *GOPHER_proxy init(NULL);
#endif /* USE_GOPHER */
global char *FTP_proxy init(NULL);
global ParsedURL HTTP_proxy_parsed;
+#ifdef USE_SSL
+global ParsedURL HTTPS_proxy_parsed;
+#endif /* USE_SSL */
#ifdef USE_GOPHER
global ParsedURL GOPHER_proxy_parsed;
#endif /* USE_GOPHER */
diff --git a/main.c b/main.c
index 2ae90c6..347d8c0 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.129 2002/11/12 12:41:57 ukai Exp $ */
+/* $Id: main.c,v 1.130 2002/11/14 16:56:23 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -417,6 +417,14 @@ main(int argc, char **argv, char **envp)
((p = getenv("HTTP_PROXY")) ||
(p = getenv("http_proxy")) || (p = getenv("HTTP_proxy"))))
HTTP_proxy = p;
+#ifdef USE_SSL
+ if (!non_null(HTTPS_proxy) &&
+ ((p = getenv("HTTPS_PROXY")) ||
+ (p = getenv("https_proxy")) || (p = getenv("HTTPS_proxy"))))
+ HTTPS_proxy = p;
+ if (HTTPS_proxy == NULL && non_null(HTTP_proxy))
+ HTTPS_proxy = HTTP_proxy;
+#endif /* USE_SSL */
#ifdef USE_GOPHER
if (!non_null(GOPHER_proxy) &&
((p = getenv("GOPHER_PROXY")) ||
diff --git a/rc.c b/rc.c
index 9de34dd..19450b7 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.62 2002/11/12 12:42:51 ukai Exp $ */
+/* $Id: rc.c,v 1.63 2002/11/14 16:56:24 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -91,6 +91,9 @@ static char *config_file = NULL;
#define CMT_VISITED_ANCHOR "訪れたことがあるリンクは色を変える"
#define CMT_V_COLOR "訪れたことがあるリンクの色"
#define CMT_HTTP_PROXY "HTTPプロキシ(URLで入力)"
+#ifdef USE_SSL
+#define CMT_HTTPS_PROXY "HTTPSプロキシ(URLで入力)"
+#endif /* USE_SSL */
#ifdef USE_GOPHER
#define CMT_GOPHER_PROXY "GOPHERプロキシ(URLで入力)"
#endif /* USE_GOPHER */
@@ -240,6 +243,9 @@ static char *config_file = NULL;
#define CMT_BG_COLOR "Color of background"
#define CMT_MARK_COLOR "Color of mark"
#define CMT_HTTP_PROXY "URL of HTTP proxy host"
+#ifdef USE_SSL
+#define CMT_HTTPS_PROXY "URL of HTTPS proxy host"
+#endif /* USE_SSL */
#ifdef USE_GOPHER
#define CMT_GOPHER_PROXY "URL of GOPHER proxy host"
#endif /* USE_GOPHER */
@@ -630,6 +636,10 @@ struct param_ptr params3[] = {
struct param_ptr params4[] = {
{"http_proxy", P_STRING, PI_TEXT, (void *)&HTTP_proxy, CMT_HTTP_PROXY,
NULL},
+#ifdef USE_SSL
+ {"https_proxy", P_STRING, PI_TEXT, (void *)&HTTPS_proxy, CMT_HTTPS_PROXY,
+ NULL},
+#endif /* USE_SSL */
#ifdef USE_GOPHER
{"gopher_proxy", P_STRING, PI_TEXT, (void *)&GOPHER_proxy,
CMT_GOPHER_PROXY, NULL},
@@ -1220,6 +1230,10 @@ parse_proxy()
{
if (non_null(HTTP_proxy))
parseURL(HTTP_proxy, &HTTP_proxy_parsed, NULL);
+#ifdef USE_SSL
+ if (non_null(HTTPS_proxy))
+ parseURL(HTTPS_proxy, &HTTPS_proxy_parsed, NULL);
+#endif /* USE_SSL */
#ifdef USE_GOPHER
if (non_null(GOPHER_proxy))
parseURL(GOPHER_proxy, &GOPHER_proxy_parsed, NULL);
diff --git a/url.c b/url.c
index 3c1c283..b07a330 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.55 2002/11/06 15:03:26 ukai Exp $ */
+/* $Id: url.c,v 1.56 2002/11/14 16:56:24 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1600,8 +1600,11 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
hr->command = HR_COMMAND_POST;
if (request && request->method == FORM_METHOD_HEAD)
hr->command = HR_COMMAND_HEAD;
- if (non_null(HTTP_proxy) &&
- !Do_not_use_proxy &&
+ if ((
+#ifdef USE_SSL
+ (pu->scheme == SCM_HTTPS) ? non_null(HTTPS_proxy) :
+#endif /* USE_SSL */
+ non_null(HTTP_proxy)) && !Do_not_use_proxy &&
pu->host != NULL && !check_no_proxy(pu->host)) {
char *save_label;
hr->flag |= HR_FLAG_PROXY;
@@ -1614,17 +1617,21 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
return uf;
}
}
+ else if (pu->scheme == SCM_HTTPS) {
+ sock = openSocket(HTTPS_proxy_parsed.host,
+ schemetable[HTTPS_proxy_parsed.scheme].
+ cmdname, HTTPS_proxy_parsed.port);
+ sslh = NULL;
+ }
else {
+#endif /* USE_SSL */
sock = openSocket(HTTP_proxy_parsed.host,
schemetable[HTTP_proxy_parsed.scheme].
cmdname, HTTP_proxy_parsed.port);
+#ifdef USE_SSL
sslh = NULL;
}
-#else
- sock = openSocket(HTTP_proxy_parsed.host,
- schemetable[HTTP_proxy_parsed.scheme].cmdname,
- HTTP_proxy_parsed.port);
-#endif
+#endif /* USE_SSL */
if (sock < 0) {
#ifdef SOCK_DEBUG
sock_log("Can't open socket\n");
@@ -2229,11 +2236,13 @@ schemeToProxy(int scheme)
ParsedURL *pu = NULL; /* for gcc */
switch (scheme) {
case SCM_HTTP:
+ pu = &HTTP_proxy_parsed;
+ break;
#ifdef USE_SSL
case SCM_HTTPS:
-#endif
- pu = &HTTP_proxy_parsed;
+ pu = &HTTPS_proxy_parsed;
break;
+#endif
case SCM_FTP:
pu = &FTP_proxy_parsed;
break;