在IPv4环境下如何访问北邮人PT?

众所周知,身为教育网 PT 站的北邮人是无法通过公网的 IPv4 环境访问的,访问需要使用教育网 IPv6 或者是公网 IPv6,那么如果在仅有 IPv4 的环境下应该怎么访问北邮人 PT 呢?

准备环境:

  1. 一台拥有公网 IP 的 VPS,如 Vultr,Cloudcone 等
  2. 一个搭建在上述VPS上的代理服务,如 SSR,V2Ray
    修改/etc/hosts,在文件的最下面加入两行:
    1
    2
    2001:da8:215:4078:250:56ff:fe97:654d bt.byr.cn
    2001:da8:215:4078:250:56ff:fe97:654d tracker.byr.cn
    然后保存即可,使用 curl -v https://bt.byr.cn,如果返回的内容如下面所示,则说明测试成功:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    * Rebuilt URL to: https://bt.byr.cn/
    * Trying 2001:da8:215:4078:250:56ff:fe97:654d...
    * TCP_NODELAY set
    * Connected to bt.byr.cn (2001:da8:215:4078:250:56ff:fe97:654d) port 443 (#0)
    * ALPN, offering h2
    * ALPN, offering http/1.1
    * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    * successfully set certificate verify locations:
    * CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
    * TLSv1.2 (OUT), TLS header, Certificate Status (22):
    * TLSv1.2 (OUT), TLS handshake, Client hello (1):
    * TLSv1.2 (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, Client hello (1):
    * TLSv1.2 (OUT), TLS handshake, Finished (20):
    * TLSv1.2 (IN), TLS change cipher, Client hello (1):
    * TLSv1.2 (IN), TLS handshake, Finished (20):
    * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
    * ALPN, server accepted to use h2
    * Server certificate:
    * subject: CN=bt.byr.cn
    * start date: Oct 21 06:00:12 2018 GMT
    * expire date: Jan 19 06:00:12 2019 GMT
    * subjectAltName: host "bt.byr.cn" matched cert's "bt.byr.cn"
    * issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
    * SSL certificate verify ok.
    * Using HTTP2, server supports multi-use
    * Connection state changed (HTTP/2 confirmed)
    * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
    * Using Stream ID: 1 (easy handle 0x563501c8d9f0)
    > GET / HTTP/1.1
    > Host: bt.byr.cn
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    * Connection state changed (MAX_CONCURRENT_STREAMS updated)!
    < HTTP/2 302
    < server: nginx
    < date: Tue, 15 Jan 2019 04:37:03 GMT
    < content-type: text/html; charset=utf-8
    < x-powered-by: HHVM/3.7.0-dev
    < vary: Accept-Encoding
    < location: https://bt.byr.cn/login.php
    <
    * Curl_http_done: called premature == 0
    * Connection #0 to host bt.byr.cn left intact
    此时便可以通过这台服务器上搭建的代理服务访问北邮人PT,注意请设置代理客户端为全局模式,或者将 hosts 中的两个域名加入客户端的代理列表中。