@@ -4,41 +4,40 @@ import ( |
4 | 4 | "bufio" |
5 | 5 | "compress/gzip" |
6 | 6 | "context" |
7 | | - "crypto/tls" |
| 7 | + "crypto/sha256" |
| 8 | + "encoding/binary" |
8 | 9 | "flag" |
9 | 10 | "fmt" |
10 | 11 | "io" |
11 | | - "io/ioutil" |
12 | 12 | "log" |
| 13 | + "net" |
13 | 14 | "net/http" |
14 | 15 | "net/http/cookiejar" |
15 | 16 | "net/url" |
16 | 17 | "os" |
17 | 18 | "strconv" |
18 | 19 | "strings" |
19 | | - "time" |
| 20 | + "sync" |
20 | 21 |
|
| 22 | + utls "github.com/refraction-networking/utls" |
21 | 23 | "golang.org/x/crypto/argon2" |
22 | | - |
23 | | - "github.com/cretz/bine/tor" |
24 | | - "github.com/ipsn/go-libtor" |
| 24 | + "golang.org/x/net/http2" |
| 25 | + "golang.org/x/net/proxy" |
25 | 26 | ) |
26 | 27 |
|
27 | 28 | var parallelism = flag.Int("p", 1, "Parallelism") |
28 | 29 | var length = flag.Int("l", 32, "Length") |
29 | 30 | var target = flag.String("target", "", "The URL to retrieve (required)") |
30 | | -var ua = flag.String("ua", "Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0", "Tor user agent by default") |
| 31 | +var ua = flag.String("ua", "Mozilla/5.0 (Windows NT 10.0; rv:140.0) Gecko/20100101 Firefox/140.0", "Tor user agent by default") |
| 32 | +var socksAddr = flag.String("proxy", "socks5://127.0.0.1:9050", "SOCKS5 proxy address for Tor") |
31 | 33 |
|
32 | 34 | func main() { |
33 | 35 | flag.Parse() |
34 | 36 | if *target == "" { |
35 | 37 | flag.Usage() |
36 | 38 | os.Exit(1) |
37 | 39 | } |
38 | | - http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} |
39 | | - |
40 | 40 | tc := NewTorClient() |
41 | | - defer tc.Close() |
42 | 41 | resp, err := tc.Fetch(*target, "") |
43 | 42 | if err != nil { |
44 | 43 | log.Fatal(err) |
@@ -57,7 +56,7 @@ func main() { |
57 | 56 | default: |
58 | 57 | reader = resp.Body |
59 | 58 | } |
60 | | - body, err := ioutil.ReadAll(reader) |
| 59 | + body, err := io.ReadAll(reader) |
61 | 60 | if err != nil { |
62 | 61 | log.Fatal(err) |
63 | 62 | } |
@@ -75,6 +74,9 @@ type ArgonParams struct { |
75 | 74 | } |
76 | 75 |
|
77 | 76 | func (p ArgonParams) Check(n int) bool { |
| 77 | + if p.difficulty == 0 { |
| 78 | + return true |
| 79 | + } |
78 | 80 | password := fmt.Sprintf("%s%d", p.prefix, n) |
79 | 81 | hash := argon2.IDKey([]byte(password), []byte(p.salt), p.iterations, p.memory, p.parallelism, p.keyLength) |
80 | 82 | for i, v := range hash[:(p.difficulty+1)/2] { |
@@ -91,105 +93,309 @@ func (p ArgonParams) Check(n int) bool { |
91 | 93 | return false |
92 | 94 | } |
93 | 95 |
|
94 | | -type TorClient struct { |
95 | | - c http.Client |
96 | | - torCtx *tor.Tor |
| 96 | +type TartarusParams struct { |
| 97 | + salt string |
| 98 | + difficulty uint |
97 | 99 | } |
98 | 100 |
|
99 | | -func (tc *TorClient) Get(target, referer string) (*http.Response, error) { |
100 | | - req, err := http.NewRequest("GET", target, nil) |
101 | | - if err != nil { |
102 | | - return nil, err |
| 101 | +func (p TartarusParams) Check(n int) bool { |
| 102 | + input := p.salt + strconv.Itoa(n) |
| 103 | + hash := sha256.Sum256([]byte(input)) |
| 104 | + val := binary.BigEndian.Uint32(hash[:4]) |
| 105 | + return val < (1 << (32 - p.difficulty)) |
| 106 | +} |
| 107 | + |
| 108 | +// extractAttr extracts the value of an HTML attribute from a string. |
| 109 | +// e.g. extractAttr(`<html data-foo="bar">`, "data-foo") returns "bar". |
| 110 | +func extractAttr(s, attr string) string { |
| 111 | + key := attr + `="` |
| 112 | + idx := strings.Index(s, key) |
| 113 | + if idx == -1 { |
| 114 | + return "" |
103 | 115 | } |
| 116 | + start := idx + len(key) |
| 117 | + end := strings.Index(s[start:], `"`) |
| 118 | + if end == -1 { |
| 119 | + return "" |
| 120 | + } |
| 121 | + return s[start : start+end] |
| 122 | +} |
| 123 | + |
| 124 | +type TorClient struct { |
| 125 | + c http.Client |
| 126 | +} |
| 127 | + |
| 128 | +func setHeaders(req *http.Request, referer string) { |
104 | 129 | if referer != "" { |
105 | 130 | req.Header.Set("Referer", referer) |
106 | 131 | } |
107 | | - |
108 | 132 | req.Header.Set("User-Agent", *ua) |
109 | 133 | req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") |
110 | 134 | req.Header.Set("Accept-Encoding", "gzip, deflate, br") |
111 | 135 | req.Header.Set("Accept-Language", "en-US,en;q=0.5") |
112 | 136 | req.Header.Set("Upgrade-Insecure-Requests", "1") |
| 137 | +} |
| 138 | + |
| 139 | +func (tc *TorClient) Get(target, referer string) (*http.Response, error) { |
| 140 | + req, err := http.NewRequest("GET", target, nil) |
| 141 | + if err != nil { |
| 142 | + return nil, err |
| 143 | + } |
| 144 | + setHeaders(req, referer) |
113 | 145 | return tc.c.Do(req) |
114 | 146 | } |
115 | 147 |
|
116 | | -func (tc *TorClient) PostForm(target string, data url.Values) (*http.Response, error) { |
| 148 | +func (tc *TorClient) PostForm(target, referer string, data url.Values) (*http.Response, error) { |
117 | 149 | req, err := http.NewRequest("POST", target, strings.NewReader(data.Encode())) |
118 | 150 | if err != nil { |
119 | 151 | return nil, err |
120 | 152 | } |
121 | | - req.Header.Set("Referer", target) |
122 | | - |
123 | | - req.Header.Set("User-Agent", *ua) |
| 153 | + setHeaders(req, referer) |
124 | 154 | req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
125 | | - req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") |
126 | | - req.Header.Set("Accept-Encoding", "gzip, deflate, br") |
127 | | - req.Header.Set("Accept-Language", "en-US,en;q=0.5") |
128 | | - req.Header.Set("Upgrade-Insecure-Requests", "1") |
129 | 155 | return tc.c.Do(req) |
130 | 156 | } |
131 | 157 |
|
132 | | -func (tc *TorClient) Close() { |
133 | | - tc.torCtx.Close() |
| 158 | +// utlsTransport is an http.RoundTripper that dials TLS with utls |
| 159 | +// (for browser-like fingerprints) and dispatches to HTTP/2 or HTTP/1.1 |
| 160 | +// based on the ALPN-negotiated protocol. |
| 161 | +type utlsTransport struct { |
| 162 | + dialTLS func(ctx context.Context, network, addr string) (net.Conn, error) |
| 163 | + |
| 164 | + mu sync.Mutex |
| 165 | + h2Conns map[string]*http2.ClientConn |
134 | 166 | } |
135 | 167 |
|
136 | | -func NewTorClient() *TorClient { |
137 | | - ctx := context.Background() |
138 | | - torCtx, err := tor.Start( |
139 | | - ctx, |
140 | | - &tor.StartConf{ProcessCreator: libtor.Creator}, |
141 | | - ) |
142 | | - if err != nil { |
143 | | - log.Fatalf("Failed to create Tor Context = %v\n", err) |
| 168 | +func (t *utlsTransport) RoundTrip(req *http.Request) (*http.Response, error) { |
| 169 | + addr := req.URL.Hostname() |
| 170 | + port := req.URL.Port() |
| 171 | + if port == "" { |
| 172 | + port = "443" |
144 | 173 | } |
145 | | - var dialer *tor.Dialer |
146 | | - for retry := 0; retry < 3; retry++ { |
147 | | - timeoutCtx, done := context.WithTimeout(ctx, 15*time.Second) |
148 | | - dialer, err = torCtx.Dialer(timeoutCtx, nil) |
149 | | - done() |
| 174 | + hostPort := net.JoinHostPort(addr, port) |
| 175 | + |
| 176 | + // Try reusing a cached HTTP/2 connection. |
| 177 | + t.mu.Lock() |
| 178 | + cc := t.h2Conns[hostPort] |
| 179 | + t.mu.Unlock() |
| 180 | + if cc != nil { |
| 181 | + //log.Printf("transport: reusing h2 conn for %s %s", req.Method, req.URL) |
| 182 | + resp, err := cc.RoundTrip(req) |
150 | 183 | if err == nil { |
151 | | - break |
| 184 | + return resp, nil |
| 185 | + } |
| 186 | + //log.Printf("transport: cached h2 conn failed: %v, dialing new", err) |
| 187 | + t.mu.Lock() |
| 188 | + delete(t.h2Conns, hostPort) |
| 189 | + t.mu.Unlock() |
| 190 | + } else { |
| 191 | + //log.Printf("transport: no cached conn for %s %s, dialing new", req.Method, req.URL) |
| 192 | + } |
| 193 | + |
| 194 | + conn, err := t.dialTLS(req.Context(), "tcp", hostPort) |
| 195 | + if err != nil { |
| 196 | + return nil, err |
| 197 | + } |
| 198 | + |
| 199 | + // Check ALPN negotiated protocol. |
| 200 | + alpn := "" |
| 201 | + if uconn, ok := conn.(*utls.UConn); ok { |
| 202 | + alpn = uconn.ConnectionState().NegotiatedProtocol |
| 203 | + } |
| 204 | + |
| 205 | + if alpn == "h2" { |
| 206 | + cc, err := (&http2.Transport{}).NewClientConn(conn) |
| 207 | + if err != nil { |
| 208 | + conn.Close() |
| 209 | + return nil, err |
| 210 | + } |
| 211 | + t.mu.Lock() |
| 212 | + if t.h2Conns == nil { |
| 213 | + t.h2Conns = make(map[string]*http2.ClientConn) |
152 | 214 | } |
| 215 | + t.h2Conns[hostPort] = cc |
| 216 | + t.mu.Unlock() |
| 217 | + return cc.RoundTrip(req) |
| 218 | + } |
| 219 | + |
| 220 | + // HTTP/1.1 fallback. |
| 221 | + if err := req.Write(conn); err != nil { |
| 222 | + conn.Close() |
| 223 | + return nil, err |
| 224 | + } |
| 225 | + resp, err := http.ReadResponse(bufio.NewReader(conn), req) |
| 226 | + if err != nil { |
| 227 | + conn.Close() |
| 228 | + return nil, err |
| 229 | + } |
| 230 | + return resp, nil |
| 231 | +} |
| 232 | + |
| 233 | +func NewTorClient() *TorClient { |
| 234 | + proxyURL, err := url.Parse(*socksAddr) |
| 235 | + if err != nil { |
| 236 | + log.Fatalf("Failed to parse proxy URL %q: %v\n", *socksAddr, err) |
153 | 237 | } |
| 238 | + socksDialer, err := proxy.FromURL(proxyURL, proxy.Direct) |
154 | 239 | if err != nil { |
155 | | - log.Fatalf("Failed to create dialer for Tor Context - %v\n", err) |
| 240 | + log.Fatalf("Failed to create SOCKS dialer: %v\n", err) |
156 | 241 | } |
| 242 | + |
| 243 | + dialTLS := func(ctx context.Context, network, addr string) (net.Conn, error) { |
| 244 | + host, _, err := net.SplitHostPort(addr) |
| 245 | + if err != nil { |
| 246 | + host = addr |
| 247 | + } |
| 248 | + // TCP dial through the SOCKS5 proxy. |
| 249 | + rawConn, err := socksDialer.(proxy.ContextDialer).DialContext(ctx, network, addr) |
| 250 | + if err != nil { |
| 251 | + return nil, err |
| 252 | + } |
| 253 | + // TLS handshake with Firefox fingerprint. |
| 254 | + cfg := &utls.Config{ServerName: host} |
| 255 | + uConn := utls.UClient(rawConn, cfg, utls.HelloFirefox_Auto) |
| 256 | + if err := uConn.HandshakeContext(ctx); err != nil { |
| 257 | + rawConn.Close() |
| 258 | + return nil, err |
| 259 | + } |
| 260 | + return uConn, nil |
| 261 | + } |
| 262 | + |
157 | 263 | jar, _ := cookiejar.New(nil) |
158 | 264 | httpClient := http.Client{ |
159 | | - Transport: &http.Transport{ |
160 | | - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, |
161 | | - Proxy: http.ProxyFromEnvironment, |
162 | | - DialContext: dialer.DialContext, |
| 265 | + Transport: &utlsTransport{dialTLS: dialTLS}, |
| 266 | + Jar: jar, |
| 267 | + CheckRedirect: func(req *http.Request, via []*http.Request) error { |
| 268 | + // Don't follow redirects automatically; Fetch() handles them. |
| 269 | + return http.ErrUseLastResponse |
163 | 270 | }, |
164 | | - Jar: jar, |
165 | | - } |
166 | | - return &TorClient{ |
167 | | - c: httpClient, |
168 | | - torCtx: torCtx, |
169 | 271 | } |
| 272 | + return &TorClient{c: httpClient} |
170 | 273 | } |
171 | 274 |
|
172 | 275 | func (tc *TorClient) Fetch(target, referer string) (*http.Response, error) { |
173 | | - resp, err := tc.Get(target, referer) |
| 276 | + currentURL := target |
| 277 | + currentReferer := referer |
| 278 | + |
| 279 | + for range 10 { // max redirect/challenge hops |
| 280 | + resp, err := tc.Get(currentURL, currentReferer) |
| 281 | + if err != nil { |
| 282 | + return nil, err |
| 283 | + } |
| 284 | + |
| 285 | + // Follow redirects manually (we disabled auto-follow). |
| 286 | + if loc := resp.Header.Get("Location"); loc != "" && |
| 287 | + (resp.StatusCode >= 300 && resp.StatusCode < 400) { |
| 288 | + resp.Body.Close() |
| 289 | + resolved, err := resp.Request.URL.Parse(loc) |
| 290 | + if err != nil { |
| 291 | + return nil, fmt.Errorf("bad redirect Location %q: %w", loc, err) |
| 292 | + } |
| 293 | + //log.Printf("Following redirect: %s -> %s", currentURL, resolved) |
| 294 | + currentReferer = currentURL |
| 295 | + currentURL = resolved.String() |
| 296 | + continue |
| 297 | + } |
| 298 | + |
| 299 | + // Not a challenge — return directly. |
| 300 | + if resp.StatusCode != http.StatusForbidden && resp.StatusCode != http.StatusNonAuthoritativeInfo { |
| 301 | + return resp, nil |
| 302 | + } |
| 303 | + |
| 304 | + // Read the challenge body. |
| 305 | + bodyBytes, err := io.ReadAll(resp.Body) |
| 306 | + resp.Body.Close() |
| 307 | + if err != nil { |
| 308 | + return nil, err |
| 309 | + } |
| 310 | + body := string(bodyBytes) |
| 311 | + requestURL := resp.Request.URL |
| 312 | + |
| 313 | + if strings.Contains(body, "data-ttrs-challenge") { |
| 314 | + challengeResp, err := tc.solveTartarus(requestURL, body) |
| 315 | + if err != nil { |
| 316 | + return nil, err |
| 317 | + } |
| 318 | + // solveTartarus returns the re-GET response; loop to |
| 319 | + // handle further redirects or challenges on the new domain. |
| 320 | + if loc := challengeResp.Header.Get("Location"); loc != "" && |
| 321 | + (challengeResp.StatusCode >= 300 && challengeResp.StatusCode < 400) { |
| 322 | + challengeResp.Body.Close() |
| 323 | + resolved, err := requestURL.Parse(loc) |
| 324 | + if err != nil { |
| 325 | + return nil, fmt.Errorf("bad redirect Location %q: %w", loc, err) |
| 326 | + } |
| 327 | + //log.Printf("Following redirect after challenge: %s -> %s", requestURL, resolved) |
| 328 | + currentReferer = requestURL.String() |
| 329 | + currentURL = resolved.String() |
| 330 | + continue |
| 331 | + } |
| 332 | + return challengeResp, nil |
| 333 | + } |
| 334 | + return tc.solveBasedFlare(requestURL, body) |
| 335 | + } |
| 336 | + return nil, fmt.Errorf("too many redirects/challenges") |
| 337 | +} |
| 338 | + |
| 339 | +func (tc *TorClient) solveTartarus(requestURL *url.URL, body string) (*http.Response, error) { |
| 340 | + salt := extractAttr(body, "data-ttrs-challenge") |
| 341 | + diffStr := extractAttr(body, "data-ttrs-difficulty") |
| 342 | + difficulty, err := strconv.Atoi(diffStr) |
174 | 343 | if err != nil { |
175 | | - return nil, err |
| 344 | + return nil, fmt.Errorf("parsing tartarus difficulty: %w", err) |
176 | 345 | } |
177 | 346 |
|
178 | | - // Check whether we were allowed direct access. |
179 | | - if resp.StatusCode != http.StatusForbidden { |
180 | | - // If so (eg due to passing captcha earlier), then return |
181 | | - // the http.Response for caller to do what it will. |
182 | | - return resp, nil |
| 347 | + p := TartarusParams{salt: salt, difficulty: uint(difficulty)} |
| 348 | + |
| 349 | + // Brute-force SHA256 PoW from nonce=0. |
| 350 | + var nonce int |
| 351 | + for n := 0; ; n++ { |
| 352 | + if p.Check(n) { |
| 353 | + nonce = n |
| 354 | + break |
| 355 | + } |
183 | 356 | } |
184 | 357 |
|
185 | | - // Otherwise, do the captcha dance. |
186 | | - defer resp.Body.Close() |
| 358 | + // POST the solution to /.ttrs/challenge as an XHR. |
| 359 | + challengeURL := fmt.Sprintf("%s://%s/.ttrs/challenge", requestURL.Scheme, requestURL.Host) |
| 360 | + values := url.Values{} |
| 361 | + values.Set("salt", salt) |
| 362 | + values.Set("nonce", strconv.Itoa(nonce)) |
| 363 | + //log.Printf("Tartarus: salt=%s difficulty=%d nonce=%d", salt, difficulty, nonce) |
| 364 | + req, err := http.NewRequest("POST", challengeURL, strings.NewReader(values.Encode())) |
| 365 | + if err != nil { |
| 366 | + return nil, fmt.Errorf("building tartarus POST: %w", err) |
| 367 | + } |
| 368 | + req.Header.Set("Referer", requestURL.String()) |
| 369 | + req.Header.Set("User-Agent", *ua) |
| 370 | + req.Header.Set("Accept", "application/json") |
| 371 | + req.Header.Set("Accept-Language", "en-US,en;q=0.5") |
| 372 | + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
| 373 | + postResp, err := tc.c.Do(req) |
| 374 | + if err != nil { |
| 375 | + return nil, fmt.Errorf("posting tartarus solution: %w", err) |
| 376 | + } |
| 377 | + postBody, _ := io.ReadAll(postResp.Body) |
| 378 | + postResp.Body.Close() |
| 379 | + //log.Printf("Tartarus POST: status=%d body=%s", postResp.StatusCode, postBody) |
| 380 | + //log.Printf("Tartarus POST: Set-Cookie=%v", postResp.Header["Set-Cookie"]) |
| 381 | + if postResp.StatusCode != http.StatusOK { |
| 382 | + return nil, fmt.Errorf("tartarus challenge POST returned %d", postResp.StatusCode) |
| 383 | + } |
187 | 384 |
|
| 385 | + // Check what cookies the jar has for this URL. |
| 386 | + if tc.c.Jar != nil { |
| 387 | + cookies := tc.c.Jar.Cookies(requestURL) |
| 388 | + //log.Printf("Tartarus: cookies for %s: %v", requestURL, cookies) |
| 389 | + } |
| 390 | + |
| 391 | + // Re-GET the original target (cookie jar preserves ttrs_clearance). |
| 392 | + return tc.Get(requestURL.String(), requestURL.String()) |
| 393 | +} |
| 394 | + |
| 395 | +func (tc *TorClient) solveBasedFlare(requestURL *url.URL, body string) (*http.Response, error) { |
188 | 396 | var p ArgonParams |
189 | 397 | var pow string |
190 | | - scanner := bufio.NewScanner(resp.Body) |
191 | | - for scanner.Scan() { |
192 | | - l := scanner.Text() |
| 398 | + for _, l := range strings.Split(body, "\n") { |
193 | 399 | if !strings.HasPrefix(l, "\t<body data") { |
194 | 400 | continue |
195 | 401 | } |
@@ -202,43 +408,36 @@ func (tc *TorClient) Fetch(target, referer string) (*http.Response, error) { |
202 | 408 | value := split[1][1 : len(split[1])-1] |
203 | 409 | switch key { |
204 | 410 | case "data-pow": |
205 | | - // data-pow="234a8b1a036dd6aee9c2745b31ffb1b8#2b8e80f38873205a65c14f9055b6ad0567b7690d8cd0fc73ac55882f32457045#fa725558ce6c1a9343265dd2abaddde7acfdd8af56c6e7269b3fddc4b6c29884" |
206 | 411 | pow = value |
207 | 412 | params := strings.Split(pow, "#") |
208 | 413 | p.salt = params[0] |
209 | 414 | p.prefix = params[1] |
210 | 415 | case "data-time": |
211 | | - // data-time="1" |
212 | 416 | iters, err := strconv.Atoi(value) |
213 | 417 | if err != nil { |
214 | | - log.Fatal(err) |
| 418 | + return nil, fmt.Errorf("parsing basedflare time: %w", err) |
215 | 419 | } |
216 | 420 | p.iterations = uint32(iters) |
217 | 421 | case "data-diff": |
218 | | - // data-diff="24" |
219 | 422 | bits, err := strconv.Atoi(value) |
220 | 423 | if err != nil { |
221 | | - log.Fatal(err) |
| 424 | + return nil, fmt.Errorf("parsing basedflare diff: %w", err) |
222 | 425 | } |
223 | 426 | p.difficulty = bits / 8 |
224 | 427 | case "data-kb": |
225 | | - // data-kb="512" |
226 | 428 | mem, err := strconv.Atoi(value) |
227 | 429 | if err != nil { |
228 | | - log.Fatal(err) |
| 430 | + return nil, fmt.Errorf("parsing basedflare kb: %w", err) |
229 | 431 | } |
230 | 432 | p.memory = uint32(mem) |
231 | 433 | default: |
232 | | - log.Fatalf("Unexpected key: %s", key) |
| 434 | + return nil, fmt.Errorf("unexpected basedflare key: %s", key) |
233 | 435 | } |
234 | 436 | } |
235 | 437 | p.parallelism = uint8(*parallelism) |
236 | 438 | p.keyLength = uint32(*length) |
237 | 439 | break |
238 | 440 | } |
239 | | - if err := scanner.Err(); err != nil { |
240 | | - return nil, err |
241 | | - } |
242 | 441 |
|
243 | 442 | // Run the POW, single-threaded in case another circuit is running. |
244 | 443 | var result int |
@@ -249,10 +448,9 @@ func (tc *TorClient) Fetch(target, referer string) (*http.Response, error) { |
249 | 448 | } |
250 | 449 | } |
251 | 450 |
|
252 | | - // Post the result back to the checker. This will yield a redirect to |
253 | | - // our true target. |
| 451 | + // Post the result back to the checker. |
254 | 452 | values := url.Values{} |
255 | 453 | values.Set("pow_response", fmt.Sprintf("%s#%d", pow, result)) |
256 | 454 | values.Set("submit", "submit") |
257 | | - return tc.PostForm(resp.Request.URL.String(), values) |
| 455 | + return tc.PostForm(requestURL.String(), requestURL.String(), values) |
258 | 456 | } |
0 commit comments