Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a621dde0397f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2bdd0fc9d0c4
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Nov 9, 2020

  1. v2ray: 4.31.0 -> 4.32.1

    servalcatty committed Nov 9, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Copy the full SHA
    c9c5914 View commit details

Commits on Nov 20, 2020

  1. Merge pull request #103220 from servalcatty/v2ray

    v2ray: 4.31.0 -> 4.32.1
    marsam authored Nov 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2bdd0fc View commit details
Showing with 24 additions and 21 deletions.
  1. +20 −17 pkgs/tools/networking/v2ray/default.nix
  2. +4 −4 pkgs/tools/networking/v2ray/update.sh
37 changes: 20 additions & 17 deletions pkgs/tools/networking/v2ray/default.nix
Original file line number Diff line number Diff line change
@@ -3,33 +3,33 @@
}:

let
version = "4.31.0";
version = "4.32.1";

src = fetchFromGitHub {
owner = "v2ray";
owner = "v2fly";
repo = "v2ray-core";
rev = "v${version}";
sha256 = "0s0blc05nrqm78qslv5xb42pjlx5v8qqwg0pwbzhxn9s71x2669m";
sha256 = "1mlrl5fz1v3bcb83pczqp859d8w9mi7jj600a2yw7xm372w2irk8";
};

vendorSha256 = "0n2mf19fvgk5x0j2wwm4zk9xikzvl6cdvw26qar91wzcsraf5z2d";
vendorSha256 = "1mz1acdj8ailgyqrr1v47n36qc24ggzw5rmj4p2awfwz3gp2yz6z";

assets = {
# MIT licensed
"geoip.dat" = let
geoipRev = "202009300006";
geoipSha256 = "1ss2izqlmrp5b5kpw804jk6c1nyimwlccbkikix3bwfaz4vlv1nc";
geoipRev = "202011050012";
geoipSha256 = "1d2n3hskgdmcfk1nl7a8lxxz325p84i7gz44cs77z1m9r7c2vsjy";
in fetchurl {
url = "https://github.com/v2ray/geoip/releases/download/${geoipRev}/geoip.dat";
url = "https://github.com/v2fly/geoip/releases/download/${geoipRev}/geoip.dat";
sha256 = geoipSha256;
};

# MIT licensed
"geosite.dat" = let
geositeRev = "20201010021828";
geositeSha256 = "0gpfhcf4iyx7ip7rlkb0l1q64w84zvmcah52qyjwljs6l4p3hrj9";
geositeRev = "20201102141726";
geositeSha256 = "0sn2f5vd6w94ryh845mnbfyjzycg7cvb66rkzh37pg9l7fvgs4jh";
in fetchurl {
url = "https://github.com/v2ray/domain-list-community/releases/download/${geositeRev}/dlc.dat";
url = "https://github.com/v2fly/domain-list-community/releases/download/${geositeRev}/dlc.dat";
sha256 = geositeSha256;
};

@@ -59,20 +59,23 @@ let
installPhase = ''
install -Dm755 v2ray v2ctl -t $out/bin
'';

meta = {
homepage = "https://www.v2ray.com/en/index.html";
description = "A platform for building proxies to bypass network restrictions";
# The license of the dependency `https://github.com/XTLS/Go` doesn't allowed user to modify its source code,
# which made it unfree.
license = with lib.licenses; [ mit unfree ];
maintainers = with lib.maintainers; [ servalcatty ];
};
};

in runCommand "v2ray-${version}" {
inherit version;
inherit (core) meta;

nativeBuildInputs = [ makeWrapper ];

meta = {
homepage = "https://www.v2ray.com/en/index.html";
description = "A platform for building proxies to bypass network restrictions";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ servalcatty ];
};

passthru = {
updateScript = ./update.sh;
tests = {
8 changes: 4 additions & 4 deletions pkgs/tools/networking/v2ray/update.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ echo "Current version:" >&2
echo "core: $old_core_rev, geoip: $old_geoip_rev, geosite: $old_geosite_rev" >&2

function fetch_latest_rev {
curl "https://api.github.com/repos/v2ray/$1/releases" |
curl "https://api.github.com/repos/v2fly/$1/releases" |
jq '.[0].tag_name' --raw-output
}

@@ -28,7 +28,7 @@ echo "core: $core_rev, geoip: $geoip_rev, geosite: $geosite_rev" >&2
if [[ $core_rev != $old_core_rev ]]; then
echo "Prefetching core..." >&2
{ read hash; read store_path; } < <(
nix-prefetch-url --unpack --print-path "https://github.com/v2ray/v2ray-core/archive/v$core_rev.zip"
nix-prefetch-url --unpack --print-path "https://github.com/v2fly/v2ray-core/archive/v$core_rev.zip"
)

sed --in-place \
@@ -40,7 +40,7 @@ fi

if [[ $geoip_rev != $old_geoip_rev ]]; then
echo "Prefetching geoip..." >&2
hash=$(nix-prefetch-url "https://github.com/v2ray/geoip/releases/download/$geoip_rev/geoip.dat")
hash=$(nix-prefetch-url "https://github.com/v2fly/geoip/releases/download/$geoip_rev/geoip.dat")
sed --in-place \
-e "s/\bgeoipRev = \".*\"/geoipRev = \"$geoip_rev\"/" \
-e "s/\bgeoipSha256 = \".*\"/geoipSha256 = \"$hash\"/" \
@@ -49,7 +49,7 @@ fi

if [[ $geosite_rev != $old_geosite_rev ]]; then
echo "Prefetching geosite..." >&2
hash=$(nix-prefetch-url "https://github.com/v2ray/domain-list-community/releases/download/$geosite_rev/dlc.dat")
hash=$(nix-prefetch-url "https://github.com/v2fly/domain-list-community/releases/download/$geosite_rev/dlc.dat")
sed --in-place \
-e "s/\bgeositeRev = \".*\"/geositeRev = \"$geosite_rev\"/" \
-e "s/\bgeositeSha256 = \".*\"/geositeSha256 = \"$hash\"/" \