(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func TestBuildHTTPTransportSOCKS5HProxy(t *testing.T) { |
| 150 | t.Parallel() |
| 151 | |
| 152 | transport, mode, errBuild := BuildHTTPTransport("socks5h://proxy.example.com:1080") |
| 153 | if errBuild != nil { |
| 154 | t.Fatalf("BuildHTTPTransport returned error: %v", errBuild) |
| 155 | } |
| 156 | if mode != ModeProxy { |
| 157 | t.Fatalf("mode = %d, want %d", mode, ModeProxy) |
| 158 | } |
| 159 | if transport == nil { |
| 160 | t.Fatal("expected transport, got nil") |
| 161 | } |
| 162 | if transport.Proxy != nil { |
| 163 | t.Fatal("expected SOCKS5H transport to bypass http proxy function") |
| 164 | } |
| 165 | if transport.DialContext == nil { |
| 166 | t.Fatal("expected SOCKS5H transport to have custom DialContext") |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func TestBuildDialerHTTPProxyCONNECT(t *testing.T) { |
| 171 | t.Parallel() |
nothing calls this directly
no test coverage detected