Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Enable socks proxy to optimize network connection#284

Merged
calvinrp merged 1 commit intobytecodealliance:mainfrom
oovm:main
May 14, 2024
Merged

Enable socks proxy to optimize network connection#284
calvinrp merged 1 commit intobytecodealliance:mainfrom
oovm:main

Conversation

@oovm
Copy link
Contributor

@oovm oovm commented May 14, 2024

This is a network optimization for some regions (mainland China), providing socks5 support for the warg protocol and downstream tools.


Accessing the global warg server without socks proxy has a high probability of being randomly blocked.

This phenomenon has been confirmed in Shanghai, China and Beijing, China.

The error content is

error: failed to send request to registry server: error sending request for url (https://wa.dev/v1/fetch/checkpoint): error trying to connect: tcp connect error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)

Caused by:
    0: error sending request for url (https://wa.dev/v1/fetch/checkpoint): error trying to connect: tcp connect error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)
    1: error trying to connect: tcp connect error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)
    2: tcp connect error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)
    3: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)

on all network related warg command.

If the problem still exists, users in mainland China should check whether the proxy environment variable has been set

export HTTP_PROXY=socks5://127.0.0.1:7890
export HTTPS_PROXY=socks5://127.0.0.1:7890

Copy link
Collaborator

@calvinrp calvinrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR

@calvinrp
Copy link
Collaborator

calvinrp commented May 14, 2024

@oovm should we add any instructions to the README?

@calvinrp calvinrp merged commit a979452 into bytecodealliance:main May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants