فهرست منبع

Typo fixes, added third party copyright info

Eugene Fryntov 9 سال پیش
والد
کامیت
4abe230581
3فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 2 1
      psiphon/net.go
  2. 2 2
      psiphon/upstreamproxy/proxy_http.go
  3. 2 0
      psiphon/upstreamproxy/transport_proxy_auth.go

+ 2 - 1
psiphon/net.go

@@ -89,7 +89,8 @@ type DialConfig struct {
 	UpstreamProxyUrl string
 
 	// UpstreamProxyCustomHeader is a set of additional arbitrary HTTP headers that are
-	// added to CONNECT requests made through the upstream proxy specified by UpstreamProxyUrl
+	// added to all HTTP requests made through the upstream proxy specified by UpstreamProxyUrl
+	// in case of HTTP proxy
 	UpstreamProxyCustomHeaders http.Header
 
 	ConnectTimeout time.Duration

+ 2 - 2
psiphon/upstreamproxy/proxy_http.go

@@ -75,8 +75,8 @@ func newHTTP(uri *url.URL, forward proxy.Dialer) (proxy.Dialer, error) {
 		hp.password, _ = uri.User.Password()
 	}
 
-	if upstreamProyConfig, ok := forward.(*UpstreamProxyConfig); ok {
-		hp.customHeaders = upstreamProyConfig.CustomHeaders
+	if upstreamProxyConfig, ok := forward.(*UpstreamProxyConfig); ok {
+		hp.customHeaders = upstreamProxyConfig.CustomHeaders
 	}
 
 	return hp, nil

+ 2 - 0
psiphon/upstreamproxy/transport_proxy_auth.go

@@ -158,6 +158,8 @@ func (tr *ProxyAuthTransport) wrapTransportDial() DialFunc {
 	}
 }
 
+// Based on https://github.com/golang/oauth2/blob/master/transport.go
+// Copyright 2014 The Go Authors. All rights reserved.
 func cloneRequest(r *http.Request, ch http.Header) *http.Request {
 	// shallow copy of the struct
 	r2 := new(http.Request)