diff --git a/pac_unix.go b/pac_unix.go index d4613cf..3a659eb 100644 --- a/pac_unix.go +++ b/pac_unix.go @@ -1,5 +1,6 @@ //go:build !windows && (!darwin || !cgo) -// +build !windows,!darwin !cgo +// +build !windows +// +build !darwin !cgo package ieproxy diff --git a/proxy_middleman_darwin.go b/proxy_middleman_darwin.go index a89948d..6ad98b2 100644 --- a/proxy_middleman_darwin.go +++ b/proxy_middleman_darwin.go @@ -1,3 +1,6 @@ +//go:build !ios && !iossimulator +// +build !ios,!iossimulator + package ieproxy import ( diff --git a/proxy_middleman_ios.go b/proxy_middleman_ios.go new file mode 100644 index 0000000..5308e55 --- /dev/null +++ b/proxy_middleman_ios.go @@ -0,0 +1,14 @@ +//go:build ios || iossimulator +// +build ios iossimulator + +package ieproxy + +import ( + "net/http" + "net/url" +) + +func proxyMiddleman() func(req *http.Request) (i *url.URL, e error) { + // Fallthrough to ProxyFromEnvironment on all other OSes. + return http.ProxyFromEnvironment +}