Skip to content

Commit

Permalink
Enable socks proxy to optimize network connection (bytecodealliance#284)
Browse files Browse the repository at this point in the history
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

```yaml
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

```sh
export HTTP_PROXY=socks5://127.0.0.1:7890
export HTTPS_PROXY=socks5://127.0.0.1:7890
```
  • Loading branch information
oovm authored May 14, 2024
1 parent c941934 commit a979452
Show file tree
Hide file tree
Showing 2 changed files with 601 additions and 616 deletions.
Loading

0 comments on commit a979452

Please sign in to comment.