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

Upgrade script sometimes failed #2373

Closed
alexyangjie opened this issue Mar 25, 2020 · 2 comments
Closed

Upgrade script sometimes failed #2373

alexyangjie opened this issue Mar 25, 2020 · 2 comments

Comments

@alexyangjie
Copy link

  1. What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?
    v4.22.1

  2. What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.
    General day-to-day use

  3. What did you see? (Please describe in detail, such as timeout, fake TLS certificate etc)
    The upgrade script failed sometimes. I have pinpoint the issue to this command to obtain the new version. (

    NEW_VER="$(normalizeVersion "$(curl ${PROXY} -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")"
    )

curl -s "https://api.github.com/repos/v2ray/v2ray-core/releases/latest" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4

Sometimes it prints out the correct version, i.e. v4.23.1. But sometimes it prints out this https://api.github.com/repos/v2ray/v2ray-core/releases/24822244, which leads to the download failure.

  1. What's your expectation?
    It always gets the correct latest version.

  2. Please attach your configuration file (Mask IP addresses before submit this issue).
    N/A

  3. Please attach error logs, especially the bottom lines if the file is large. Error log file is usually at /var/log/v2ray/error.log on Linux.
    N/A

  4. Please attach access log. Access log is usually at '/var/log/v2ray/access.log' on Linux.
    N/A

  5. Other configurations (such as Nginx) and logs.
    N/A

  6. If V2Ray doesn't run, please attach output from --test.
    N/A

  7. If V2Ray service doesn't run, please attach journal log.
    N/A

@kslr
Copy link
Contributor

kslr commented Mar 25, 2020

fix #2374

@alexyangjie
Copy link
Author

That works like magic! Thank you for the quick fix.

kslr added a commit to v2fly/v2ray-core that referenced this issue May 31, 2020
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 8, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 8, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 8, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 8, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 14, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 14, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
IceCodeNew added a commit to IceCodeNew/qbittorrent-nox-static that referenced this issue Sep 16, 2020
It is reasonable to pass headers like `User-Agent`, see v2ray/v2ray-core#2373.
Also I don't think it's a good idea to fetch source code url from webpages like `https://www.boost.org/users/download/`, they are definitely not designed for machine-readable. And we should prefer to fetch url from REST API response from GitHub.
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

No branches or pull requests

2 participants