使用来自curl的KeepSolid(VPN Unlimited)代理

使用来自curl的KeepSolid(VPN Unlimited)代理

看来 KeepSolid 的服务器运行的是 Squid (https://89.45.7.90:3129),并且 Firefox 插件以某种方式进行身份验证,以便 Firefox 可以使用它。

我想curl与 KeepSolid 的服务器(又名 VPN Unlimited)一起使用。

(Analyticshub.link似乎是TLS证书的CN)。

$ curl -v --proxy https://analyticshub.link:3129 --proxy-digest --proxy-user $user:$pass --location https://www.google.com/
*   Trying 89.45.7.90:3129...
* TCP_NODELAY set
* Connected to analyticshub.link (89.45.7.90) port 3129 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Proxy certificate:
*  subject: CN=analyticshub.link
*  start date: Jul  5 08:11:25 2021 GMT
*  expire date: Oct  3 08:11:24 2021 GMT
*  subjectAltName: host "analyticshub.link" matched cert's "analyticshub.link"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* allocate connect buffer!
* Establish HTTP proxy tunnel to www.google.com:443
* Proxy auth using Digest with user '[email protected]'
> CONNECT www.google.com:443 HTTP/1.1
> Host: www.google.com:443
> User-Agent: curl/7.68.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 407 Proxy Authentication Required
< Server: squid/3.5.23
< Mime-Version: 1.0
< Date: Sun, 01 Aug 2021 19:02:51 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 3557
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Vary: Accept-Language
< Content-Language: en
< Proxy-Authenticate: Basic realm="Web-Proxy"
< X-Cache: MISS from vpnunlimitedapp.com
< X-Cache-Lookup: NONE from vpnunlimitedapp.com:4129
< Connection: close
< 
* Ignore 3557 bytes of response-body
* Received HTTP code 407 from proxy after CONNECT
* CONNECT phase completed!
* Closing connection 0
curl: (56) Received HTTP code 407 from proxy after CONNECT

如您所见,上面的方法不起作用。我该怎么办?

答案1

这根本不是 100% 的答案,但我尝试研究一下 Firefox 插件的工作原理。

简而言之,它似乎使用 JWT 对身份验证服务(auth.simplexsolutionsinc.com使用从多个云存储提供商获取的令牌进行冗余/绕过阻止)进行了良好的身份验证,然后返回一些与代理一起使用的临时凭据。

您应该能够捕获这些短期凭据并像现在一样使用它们,但它们可能不是简单的用户/通行证,并且可能类似于 OAuth2 承载或代理上的进一步层或 JWT。

另外,感谢您编写 GNU Parallel!

相关内容