-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Copy link
Labels
bugSomething isn't working correctlySomething isn't working correctly
Description
using client = Deno.createHttpClient({
proxy: { url: "http://127.0.0.1:8888" },
});
await fetch("https://dl.deno.land", { client });
$ tinyproxy -d & # start an HTTP proxy on port 8888
[1] 97951
NOTICE Jul 18 10:53:23.409 [97951]: Initializing tinyproxy ...
NOTICE Jul 18 10:53:23.409 [97951]: Reloading config file (/opt/homebrew/etc/tinyproxy/tinyproxy.conf)
INFO Jul 18 10:53:23.409 [97951]: Setting "Via" header to 'tinyproxy'
NOTICE Jul 18 10:53:23.409 [97951]: Reloading config file finished
INFO Jul 18 10:53:23.409 [97951]: listen_sock called with addr = '(NULL)'
INFO Jul 18 10:53:23.409 [97951]: trying to listen on host[::], family[30], socktype[1], proto[6]
INFO Jul 18 10:53:23.409 [97951]: listening on fd [4]
INFO Jul 18 10:53:23.409 [97951]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6]
INFO Jul 18 10:53:23.409 [97951]: listening on fd [5]
INFO Jul 18 10:53:23.409 [97951]: Not running as root, so not changing UID/GID.
INFO Jul 18 10:53:23.409 [97951]: Setting the various signals.
INFO Jul 18 10:53:23.409 [97951]: Starting main loop. Accepting connections.
$ deno run --unstable-http --allow-net a.ts
CONNECT Jul 18 10:53:32.204 [97951]: Connect (file descriptor 6): 127.0.0.1
CONNECT Jul 18 10:53:32.205 [97951]: Request (file descriptor 6): CONNECT dl.deno.land:443 HTTP/1.1
INFO Jul 18 10:53:32.205 [97951]: No upstream proxy for dl.deno.land
INFO Jul 18 10:53:32.205 [97951]: opensock: opening connection to dl.deno.land:443
INFO Jul 18 10:53:32.209 [97951]: opensock: getaddrinfo returned for dl.deno.land:443
CONNECT Jul 18 10:53:32.255 [97951]: Established connection to host "dl.deno.land" using file descriptor 7.
INFO Jul 18 10:53:32.255 [97951]: Not sending client headers to remote machine
INFO Jul 18 10:53:32.402 [97951]: Closed connection between local client (fd:6) and remote client (fd:7)
error: Uncaught (in promise) TypeError: client error (SendRequest)
await fetch("https://dl.deno.land", { client });
^
at async mainFetch (ext:deno_fetch/26_fetch.js:170:12)
at async fetch (ext:deno_fetch/26_fetch.js:391:7)
at async …/a.ts:4:1
$ deno --version
deno 1.45.2+7b33623 (canary, aarch64-apple-darwin)
v8 12.7.224.13
typescript 5.5.2
Also tested with an HTTP proxy other than Tinyproxy and a Socks5 proxy. In both tests Deno threw the same error. The error did not happen in the previous canary version.
yooneskh
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctly