Clash: 你能添加支持 URL 重定向吗?

创建于 2019-04-18  ·  5评论  ·  资料来源: Dreamacro/clash

URL 重定向在很多情况下都很有用。

最有用的评论

@glin93 Can you provide some scenes about "URL rewrite"? I am not sure whether it is worth implementing.

比如 maps.google.cn 已经终止运作了

所有5条评论

URL 重定向工作正常。

$ curl -v -L -s github.com
* Rebuilt URL to: github.com/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7890 (#0)
> GET http://github.com/ HTTP/1.1
> Host: github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 301 Moved Permanently
< Connection: keep-alive
< Keep-Alive: timeout=4
< Location: https://github.com/
< Proxy-Connection: keep-alive
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact
* Issue another request to this URL: 'https://github.com/'
* Found bundle for host github.com: 0x7fa1ec41ca00 [can pipeline]
* Hostname 127.0.0.1 was found in DNS cache
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7890 (#1)
* Establish HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
> Host: github.com:443
> User-Agent: curl/7.54.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* Proxy replied OK to CONNECT request
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:<strong i="6">@STRENGTH</strong>

// TLDR

抱歉,我误解了 url 重定向的含义。
我想说的可能是 URL 重写。 就像将 google.cn 重写为 google.com。

@glin93你能提供一些关于“URL 重写”的场景吗? 我不确定是否值得实施。

例如,印象网和印象笔记网。 如果我想使用应用商店版本,我只能使用国际帐户。

另一个场景是许多应用程序根据系统的区域设置来选择服务。 像 safari 一样使用 google.cn 作为搜索引擎谷歌。 如果我不想更改我的地区但仍需要 google.com 服务,重写将非常有用。

最重要的是,URL 重写在大多数情况下可能并不那么重要,但它确实为用户提供了一种方便的方法,可以根据需要控制服务。

@glin93 Can you provide some scenes about "URL rewrite"? I am not sure whether it is worth implementing.

比如 maps.google.cn 已经终止运作了

此页面是否有帮助?
0 / 5 - 0 等级