Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加域名fallback,以应对蓝奏云某些域名有时候会短暂挂掉的情况 #60

Closed
wants to merge 5 commits into from

Conversation

fzls
Copy link
Contributor

@fzls fzls commented May 12, 2021

https://pan.lanzous.com/ 又挂掉了=、=以前也出现过这种问题,加了下兼容措施,在_get和_post中,如果url包含self._host_url,则通过替换生成以下所有域名的链接,依次去尝试,这样即使一个挂掉,可以用其他的来顶替

        old_domain = 'pan.lanzous'
        return [
            lanzouyun_url,

            lanzouyun_url.replace(old_domain, 'pan.lanzoux'),
            lanzouyun_url.replace(old_domain, 'wws.lanzoux'),
            lanzouyun_url.replace(old_domain, 'www.lanzoux'),
            lanzouyun_url.replace(old_domain, 'wwx.lanzoux'),

            lanzouyun_url.replace(old_domain, 'wws.lanzous'),
            lanzouyun_url.replace(old_domain, 'www.lanzous'),
            lanzouyun_url.replace(old_domain, 'wwx.lanzous'),

            lanzouyun_url.replace(old_domain, 'up.lanzoui'),
        ]

@zaxtyson
Copy link
Owner

zaxtyson commented May 15, 2021

image
image
image

主域名 lanzous.com 备案出问题了, 导致子域名全部挂掉了

我们把 lanzous 换成 lanzoui 或者 lanzoux 就行, 子域名使用 pan 就能够正常使用. 如果把子域名 wwx www wws 全部加进来, 可能会导致域名挂掉后, 多次重复请求其子域名, 花费很多时间. 而且用户可以自定义子域名, 导致 url 域名替换失败.

zaxtyson added a commit that referenced this pull request May 15, 2021
zaxtyson added a commit that referenced this pull request May 15, 2021
zaxtyson added a commit to zaxtyson/LanZouCloud-CMD that referenced this pull request May 15, 2021
@fzls
Copy link
Contributor Author

fzls commented May 15, 2021

好的-。-你这个图哪里搞的哇

@zaxtyson
Copy link
Owner

https://www.boce.com/ping 这个工具还不错😄

@fzls
Copy link
Contributor Author

fzls commented May 15, 2021

https://www.boce.com/ping 这个工具还不错😄

收藏下哈哈

@fzls fzls closed this Sep 5, 2021
@fzls fzls reopened this Sep 5, 2021
@fzls fzls closed this Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants