You are not logged in.
I'm in China so I have to use a kind of proxy (not exactly a VPN) to use AUR. My proxy software had worked pretty well in both browsing websites like google and proxying for terminal services such as git and yay. However several days ago, I can't use yay anymore both with and without proxy. For example, when I use the command "yay -Syu", it shows:
Sync Dependency (1): nodejs-20.4.0-1
:: (0/2) Downloaded PKGBUILD: visual-studio-code-bin
:: (0/2) Downloaded PKGBUILD: wemeet-bin
-> error fetching visual-studio-code-bin: fatal: unable to access 'https://aur.archlinux.org/visual-studio-code-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server
context: exit status 1
error fetching wemeet-bin: Cloning into 'wemeet-bin'...
fatal: unable to access 'https://aur.archlinux.org/wemeet-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server
context: exit status 128
It's important to note that my proxy tool will be opened in the first place in the terminal in a separate tag and it shows it's listening to the ports like this:
sswybd% ./clash-linux-amd64-v1.10.0 -f glados.yaml -d .
INFO[0000] Start initial compatible provider Auto-Fast
INFO[0000] Start initial compatible provider Auto
INFO[0000] Start initial compatible provider Express
INFO[0000] Start initial compatible provider NETFLIX
INFO[0000] Start initial compatible provider Proxy
INFO[0000] Start initial compatible provider Video
INFO[0000] Start initial compatible provider Auto-Failover
INFO[0000] Start initial compatible provider Auto-Edge
INFO[0000] HTTP proxy listening at: 127.0.0.1:7890
INFO[0000] SOCKS proxy listening at: 127.0.0.1:7891
INFO[0000] RESTful API listening at: 127.0.0.1:9090
and the icon flashes to show it's listening. Then I'll use the following codes in my working tag.
export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891
When I use yay both for now and for the previous successful time, it adds some new green messages to show it connects and uses proxy successfully, like this:
INFO[0168] [TCP] 127.0.0.1:47396 --> www.google.com:443 match DomainSuffix(google.com) using Proxy[GLaDOS-H2-01]
INFO[0175] [TCP] 127.0.0.1:36098 --> accounts.google.com:443 match DomainSuffix(google.com) using Proxy[GLaDOS-H2-01]
INFO[0222] [TCP] 127.0.0.1:36192 --> aur.archlinux.org:443 match Match() using Proxy[GLaDOS-H2-01]
Although it fails now, it still shows the green messages above, indicating my proxy is working somehow accurately. And my browsing websites like google still works very well, by means of using the settings' proxy in plasma's setting. When I don't use proxy to use yay, it still shows exactly the same error messages.
Last edited by sswybd (2023-07-09 09:55:35)
Offline
Failed to connect to 127.0.0.1 port 8000
INFO[0000] HTTP proxy listening at: 127.0.0.1:7890
INFO[0000] SOCKS proxy listening at: 127.0.0.1:7891
INFO[0000] RESTful API listening at: 127.0.0.1:9090
So the first error is meaningless, you configured the wrong port.
export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891
Although it fails now, it still shows the green messages above
The more intersting thing would be what error message(s) you get now for accessing the AUR
curl -v https://aur.archlinux.org/ > /dev/null
Offline
Failed to connect to 127.0.0.1 port 8000
INFO[0000] HTTP proxy listening at: 127.0.0.1:7890 INFO[0000] SOCKS proxy listening at: 127.0.0.1:7891 INFO[0000] RESTful API listening at: 127.0.0.1:9090
So the first error is meaningless, you configured the wrong port.
export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891
Although it fails now, it still shows the green messages above
The more intersting thing would be what error message(s) you get now for accessing the AUR
curl -v https://aur.archlinux.org/ > /dev/null
So what do you mean by configuring the wrong port? My proxy only provides listening at port 7890 and 7891 and if I change the export command to 8000, then error appears.
Offline
Failed to connect to 127.0.0.1 port 8000
INFO[0000] HTTP proxy listening at: 127.0.0.1:7890 INFO[0000] SOCKS proxy listening at: 127.0.0.1:7891 INFO[0000] RESTful API listening at: 127.0.0.1:9090
So the first error is meaningless, you configured the wrong port.
export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891export http_proxy=socks5://127.0.0.1:7891 ; export https_proxy=socks5://127.0.0.1:7891
Although it fails now, it still shows the green messages above
The more intersting thing would be what error message(s) you get now for accessing the AUR
curl -v https://aur.archlinux.org/ > /dev/null
You asked the response of curl to AUR, they are as below:
1.if i don't use proxy, the message is:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 95.216.144.15:443...
* Trying [2a01:4f9:c010:50::1]:443...
* Immediate connect fail for 2a01:4f9:c010:50::1: Network is unreachable
* Connected to aur.archlinux.org (95.216.144.15) port 443 (#0)
* ALPN: offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4290 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [520 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN=aur.archlinux.org
* start date: May 13 22:23:27 2023 GMT
* expire date: Aug 11 22:23:26 2023 GMT
* subjectAltName: host "aur.archlinux.org" matched cert's "aur.archlinux.org"
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
} [5 bytes data]
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: aur.archlinux.org]
* h2 [:path: /]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x5619ef4a3520)
} [5 bytes data]
> GET / HTTP/2
> Host: aur.archlinux.org
> User-Agent: curl/8.1.2
> Accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [57 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [57 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< HTTP/2 200
< server: nginx
< date: Sun, 09 Jul 2023 08:30:42 GMT
< content-type: text/html; charset=utf-8
< content-length: 21515
< content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'nonce-984bd90e' cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' cdn.jsdelivr.net
< x-content-type-options: nosniff
< referrer-policy: same-origin
< x-frame-options: SAMEORIGIN
< strict-transport-security: max-age=31536000; includeSubdomains; preload
<
{ [16053 bytes data]
100 21515 100 21515 0 0 18002 0 0:00:01 0:00:01 --:--:-- 18004
* Connection #0 to host aur.archlinux.org left intact
2. if i use the proxy, the response is:
* Uses proxy env variable https_proxy == 'socks5://127.0.0.1:7891'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:7891...
* Connected to 127.0.0.1 (127.0.0.1) port 7891 (#0)
* SOCKS5 connect to IPv4 95.216.144.15:443 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 7891 (#0)
* ALPN: offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4290 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [520 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN=aur.archlinux.org
* start date: May 13 22:23:27 2023 GMT
* expire date: Aug 11 22:23:26 2023 GMT
* subjectAltName: host "aur.archlinux.org" matched cert's "aur.archlinux.org"
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
} [5 bytes data]
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: aur.archlinux.org]
* h2 [:path: /]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x563b3ed56520)
} [5 bytes data]
> GET / HTTP/2
> Host: aur.archlinux.org
> User-Agent: curl/8.1.2
> Accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [57 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [57 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0< HTTP/2 200
< server: nginx
< date: Sun, 09 Jul 2023 08:31:27 GMT
< content-type: text/html; charset=utf-8
< content-length: 21515
< content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'nonce-8e924750' cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' cdn.jsdelivr.net
< x-content-type-options: nosniff
< referrer-policy: same-origin
< x-frame-options: SAMEORIGIN
< strict-transport-security: max-age=31536000; includeSubdomains; preload
<
{ [16053 bytes data]
100 21515 100 21515 0 0 12312 0 0:00:01 0:00:01 --:--:-- 12308
* Connection #0 to host 127.0.0.1 left intact
I don't quite understand what do these error messages mean.
Offline
So what do you mean by configuring the wrong port? My proxy only provides listening at port 7890 and 7891 and if I change the export command to 8000, then error appears.
The first error
Sync Dependency (1): nodejs-20.4.0-1
:: (0/2) Downloaded PKGBUILD: visual-studio-code-bin
:: (0/2) Downloaded PKGBUILD: wemeet-bin
-> error fetching visual-studio-code-bin: fatal: unable to access 'https://aur.archlinux.org/visual-studio-code-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server
context: exit status 1
error fetching wemeet-bin: Cloning into 'wemeet-bin'...
fatal: unable to access 'https://aur.archlinux.org/wemeet-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server
context: exit status 128
is an attempt to use a proxy on 127.0.0.1:8000 where nothing is listening.
The "8000" there is a misconfiguration.
You seem to be curling aur.archlinux.org w/ and w/o proxy and any problems on port 7891
From what it looks like you simply fail to globally export http_proxy=socks5://127.0.0.1:7891 and https_proxy=socks5://127.0.0.1:7891
https://wiki.archlinux.org/title/Environment_variables
Aternatively configure your socks proxy to actually listen on port 8000.
Offline
So what do you mean by configuring the wrong port? My proxy only provides listening at port 7890 and 7891 and if I change the export command to 8000, then error appears.
The first error
Sync Dependency (1): nodejs-20.4.0-1 :: (0/2) Downloaded PKGBUILD: visual-studio-code-bin :: (0/2) Downloaded PKGBUILD: wemeet-bin -> error fetching visual-studio-code-bin: fatal: unable to access 'https://aur.archlinux.org/visual-studio-code-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server context: exit status 1 error fetching wemeet-bin: Cloning into 'wemeet-bin'... fatal: unable to access 'https://aur.archlinux.org/wemeet-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server context: exit status 128
is an attempt to use a proxy on 127.0.0.1:8000 where nothing is listening.
The "8000" there is a misconfiguration.You seem to be curling aur.archlinux.org w/ and w/o proxy and any problems on port 7891
From what it looks like you simply fail to globally export http_proxy=socks5://127.0.0.1:7891 and https_proxy=socks5://127.0.0.1:7891
https://wiki.archlinux.org/title/Environment_variablesAternatively configure your socks proxy to actually listen on port 8000.
My proxy subscription is simple and can only listen the default port, which is 7890 and 7891. I don't understand why my "export" command suddenly failed. I indeed use the "export ...." command. So which command or configuration of the variables should I use in the website . https://wiki.archlinux.org/title/Environment_variables
Offline
Please stop top-quoting full posts, you're psoting to a forum.
How is this solved?
Any approach there listed can be viable, but it's important to export the variables to the relevant context (eg. in a session script or in doubt your shell rc, the most global approach would be some /etc/profile.d/proxy.sh script)
Offline
So what do you mean by configuring the wrong port? My proxy only provides listening at port 7890 and 7891 and if I change the export command to 8000, then error appears.
The first error
Sync Dependency (1): nodejs-20.4.0-1 :: (0/2) Downloaded PKGBUILD: visual-studio-code-bin :: (0/2) Downloaded PKGBUILD: wemeet-bin -> error fetching visual-studio-code-bin: fatal: unable to access 'https://aur.archlinux.org/visual-studio-code-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server context: exit status 1 error fetching wemeet-bin: Cloning into 'wemeet-bin'... fatal: unable to access 'https://aur.archlinux.org/wemeet-bin.git/': Failed to connect to 127.0.0.1 port 8000 after 0 ms: Couldn't connect to server context: exit status 128
is an attempt to use a proxy on 127.0.0.1:8000 where nothing is listening.
The "8000" there is a misconfiguration.You seem to be curling aur.archlinux.org w/ and w/o proxy and any problems on port 7891
From what it looks like you simply fail to globally export http_proxy=socks5://127.0.0.1:7891 and https_proxy=socks5://127.0.0.1:7891
https://wiki.archlinux.org/title/Environment_variablesAternatively configure your socks proxy to actually listen on port 8000.
It turned out that what you said is true. Yay is using port 8000 and I managed to find the website management tool to add a mixed port 8000. Then I don't need to change variable or use setting's proxy and my yay works very well. It all thanks to you though I still quite don't understand your last post.
Offline