Skip to content

How can I develop a proxy server with Deno or nodejs? #14789

@jiawei397

Description

@jiawei397

Sometimes I visit deno land gets stuck, and I can't even download the corresponding resources. I'm not sure whether this is related to the policy.

Because I need to install dependencies in the CICD pipeline, sometimes the installation failure will affect the service update, so I want to use proxy to solve my problem.

Deno supports proxies for module downloads and the Web standard fetch API.
Proxy configuration is read from environmental variables: HTTP_PROXY, HTTPS_PROXY and NO_PROXY.
In case of Windows, if environment variables are not found Deno falls back to reading proxies from registry.

But I don't know how to develop this service? In my imagination, I want to cache the corresponding resources on my server and return directly from the server next time.This step is easy, but I don't know what rules can meet the proxy requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions