Skip to content

Commit

Permalink
Fix: compatible with Go v1.16
Browse files Browse the repository at this point in the history
The flag `--insecure` in go get command has been deprecated in Go v1.16
  • Loading branch information
Loyalsoldier committed Feb 25, 2021
1 parent 4bcb7fb commit 5fc917c
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 50 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go 1.x.y
uses: actions/setup-go@v2
with:
go-version: "^1.15.3"
go-version: ^1.16

- name: Set variables
run: |
Expand All @@ -39,7 +39,6 @@ jobs:
- name: Build geoip.dat
run: |
go mod download
go run ./ --country=./geoip/GeoLite2-Country-Locations-en.csv --ipv4=./geoip/GeoLite2-Country-Blocks-IPv4.csv --ipv6=./geoip/GeoLite2-Country-Blocks-IPv6.csv
- name: Generate geoip.dat sha256 checksum
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Automatically weekly release of `geoip.dat` for V2Ray.

## Download links

- **geoip.dat**[https://github.com/v2fly/geoip/raw/release/geoip.dat](https://github.com/v2fly/geoip/raw/release/geoip.dat)
- **geoip.dat.sha256sum**[https://github.com/v2fly/geoip/raw/release/geoip.dat.sha256sum](https://github.com/v2fly/geoip/raw/release/geoip.dat.sha256sum)
- **geoip.dat**[https://github.com/v2fly/domain-list-community/releases/latest/download/geoip.dat](https://github.com/v2fly/domain-list-community/releases/latest/download/geoip.dat)
- **geoip.dat.sha256sum**[https://github.com/v2fly/domain-list-community/releases/latest/download/geoip.dat.sha256sum](https://github.com/v2fly/domain-list-community/releases/latest/download/geoip.dat.sha256sum)

## Usage example

Expand Down Expand Up @@ -57,6 +57,17 @@ Automatically weekly release of `geoip.dat` for V2Ray.
}
```

## Generate `geoip.dat` manually

- Install `golang` and `git`
- Clone project code: `git clone https://github.com/v2fly/geoip.git`
- Download `GeoLite2-Country-CSV.zip` from [MaxMind](https://dev.maxmind.com/geoip/geoip2/geolite2/), then unzip it to `geoip` directory
- Navigate to project root directory: `cd geoip`
- Install project dependencies: `go mod download`
- Generate geoip.dat: `go run ./`

Run `go run ./ --help` for more usage information.

## Notice

This product includes GeoLite2 data created by MaxMind, available from [MaxMind](http://www.maxmind.com).
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module github.com/v2fly/geoip

go 1.15
go 1.16

require (
github.com/v2fly/v2ray-core/v4 v4.34.1-0.20210224091244-9d13f99633c8
google.golang.org/protobuf v1.25.0
v2ray.com/core v4.19.1+incompatible
)

replace v2ray.com/core => github.com/v2fly/v2ray-core v0.0.0-20201225111350-8c5b392f2763
Loading

0 comments on commit 5fc917c

Please sign in to comment.