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

[pull] master from zu1k:master #20

Open
wants to merge 285 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
285 commits
Select commit Hold shift + click to select a range
d8b2da8
parse cdn when parse stdin
Jul 18, 2020
ada57ac
add init for root
Jul 18, 2020
a7a4282
rm noneed
Jul 18, 2020
69c33c9
update readme
Jul 18, 2020
a74c9c7
add zh doc
Jul 18, 2020
678afa7
Update README.md
zu1k Jul 19, 2020
d638708
Create dependabot.yml
zu1k Jul 19, 2020
fc6e29f
Update dependabot.yml
zu1k Jul 19, 2020
1a54dc9
Update actions/checkout requirement to v2.3.1
dependabot[bot] Jul 19, 2020
720dc5b
Bump actions/upload-artifact from v1 to 2.1.0
dependabot[bot] Jul 19, 2020
371cafa
Merge pull request #2 from zu1k/dependabot/github_actions/actions/upl…
zu1k Jul 19, 2020
9b37b01
Merge pull request #1 from zu1k/dependabot/github_actions/actions/che…
zu1k Jul 19, 2020
9f4a447
fix common
Jul 19, 2020
2c1b57f
Merge branch 'master' of github.com:zu1k/nali
Jul 19, 2020
3b0d598
update readme
Jul 19, 2020
9ae7c1d
update readme
Jul 19, 2020
d48bec5
update readme
Jul 19, 2020
3c2d90d
add term rec
Jul 19, 2020
f28b696
update readme
Jul 19, 2020
3fdbc9c
update
Jul 19, 2020
523ce6b
add download fail catch
Jul 20, 2020
23925d2
fix not return
Jul 20, 2020
0e0df13
add zx ipv6 db download
Jul 20, 2020
363537c
add ipip db support
Jul 20, 2020
0b2c1ab
update readme
Jul 20, 2020
e69316b
fix space after ip
Jul 21, 2020
ace8309
add trim for result
Jul 21, 2020
e626805
specific db homedir
Jul 21, 2020
176c3d6
mod qqwry download
Jul 21, 2020
bee8698
remove indexLen
Jul 21, 2020
628c998
mod zxipv6 download
Jul 21, 2020
d5d766f
update all db
Jul 21, 2020
1e06f9c
update readme
Jul 21, 2020
eaa5d33
Update README.md
zu1k Jul 26, 2020
f02fdd8
Update README_zh-CN.md
zu1k Jul 26, 2020
9187528
Bump actions/upload-artifact from 2.1.0 to v2.1.1
dependabot[bot] Jul 28, 2020
dd4fbec
Merge pull request #4 from zu1k/dependabot/github_actions/actions/upl…
zu1k Jul 29, 2020
2fdf1b0
fix cdn db download
Jul 29, 2020
9937830
Merge branch 'master' of github.com:zu1k/nali
Jul 29, 2020
efd48b4
chore
Jul 29, 2020
52e94ee
Bump actions/upload-artifact from v2.1.1 to v2.1.2
dependabot[bot] Aug 3, 2020
ff1ce80
Merge pull request #7 from zu1k/dependabot/github_actions/actions/upl…
zu1k Aug 3, 2020
2f11825
Bump actions/upload-artifact from v2.1.2 to v2.1.3
dependabot[bot] Aug 5, 2020
77a1334
Merge pull request #8 from zu1k/dependabot/github_actions/actions/upl…
zu1k Aug 5, 2020
23ba5a4
transform GBK to UTF-8 when file type is 3
Aug 10, 2020
ac1ca3f
move system related code to app
Aug 10, 2020
df01496
no use syscall
Aug 10, 2020
a5a7cda
Bump actions/checkout from v2.3.1 to v2.3.2
dependabot[bot] Aug 10, 2020
e1cf853
Merge pull request #9 from zu1k/dependabot/github_actions/actions/che…
zu1k Aug 10, 2020
85d1f2e
Bump actions/upload-artifact from v2.1.3 to v2.1.4
dependabot[bot] Aug 12, 2020
87fa65c
Merge pull request #11 from zu1k/dependabot/github_actions/actions/up…
zu1k Aug 14, 2020
8a3aedd
update readme
Aug 16, 2020
1f8cf90
Merge branch 'master' of github.com:zu1k/nali
Aug 16, 2020
b831286
update readme
Aug 17, 2020
9752db5
Optimized ip checking algorithm
Sep 7, 2020
ebb0893
Bump docker/build-push-action from v1.1.0 to v2
dependabot[bot] Sep 7, 2020
7903f81
Merge pull request #15 from zu1k/dependabot/github_actions/docker/bui…
zu1k Sep 7, 2020
40c8fbd
Optimized ip checking algorithm for ipv6
oldthreefeng Sep 7, 2020
29ce0ec
Merge pull request #16 from oldthreefeng/master
zu1k Sep 7, 2020
4e2b471
Fix #18
Sep 9, 2020
7cd2908
Bump actions/checkout from v2.3.2 to v2.3.3
dependabot[bot] Sep 24, 2020
dccf73d
Merge pull request #21 from zu1k/dependabot/github_actions/actions/ch…
zu1k Sep 25, 2020
2d7d50b
fix issue 22: replace ip4/ip6/domain with regexp with lookahead and l…
hyliang96 Sep 26, 2020
ba4f91c
Merge pull request #23 from hyliang96/issue22
zu1k Sep 27, 2020
1607184
better ValidIP
Sep 28, 2020
27ea990
Bump actions/upload-artifact from v2.1.4 to v2.2.0
dependabot[bot] Oct 2, 2020
756e6c7
Merge pull request #25 from zu1k/dependabot/github_actions/actions/up…
zu1k Oct 8, 2020
7c79002
Bump github.com/spf13/cobra from 1.0.0 to 1.1.0
dependabot[bot] Oct 15, 2020
7c355f3
Merge pull request #27 from zu1k/dependabot/go_modules/github.com/spf…
zu1k Oct 15, 2020
a90787b
Bump github.com/spf13/cobra from 1.1.0 to 1.1.1
dependabot[bot] Oct 19, 2020
220c306
Merge pull request #28 from zu1k/dependabot/go_modules/github.com/spf…
zu1k Oct 27, 2020
a8065e5
Bump golang.org/x/text from 0.3.3 to 0.3.4
dependabot[bot] Oct 28, 2020
85568e6
Bump actions/checkout from v2.3.3 to v2.3.4
dependabot[bot] Nov 4, 2020
5d9c7d0
Merge pull request #29 from zu1k/dependabot/go_modules/golang.org/x/t…
zu1k Nov 4, 2020
d16a6df
Merge pull request #30 from zu1k/dependabot/github_actions/actions/ch…
zu1k Nov 4, 2020
44f662e
Bump github.com/ipipdotnet/ipdb-go from 1.3.0 to 1.3.1
dependabot[bot] Nov 10, 2020
4b11bae
Bump actions/upload-artifact from v2.2.0 to v2.2.1
dependabot[bot] Nov 16, 2020
d28d9ef
Merge pull request #31 from zu1k/dependabot/go_modules/github.com/ipi…
zu1k Nov 17, 2020
db9ec42
Merge pull request #32 from zu1k/dependabot/github_actions/actions/up…
zu1k Nov 17, 2020
79bef72
Bump actions/upload-artifact from v2.2.1 to v2.2.2
dependabot[bot] Jan 5, 2021
a179517
Bump golang.org/x/text from 0.3.4 to 0.3.5
dependabot[bot] Jan 11, 2021
21fdfe9
Bump actions/cache from v2 to v2.1.4 (#36)
dependabot[bot] Feb 21, 2021
3dda35a
Bump github.com/spf13/cobra from 1.1.1 to 1.1.3 (#38)
dependabot[bot] Feb 21, 2021
8319d35
Bump github.com/oschwald/geoip2-golang from 1.4.0 to 1.5.0 (#39)
dependabot[bot] Feb 23, 2021
7105978
fix domain re
Mar 26, 2021
c57ead2
Bump golang.org/x/text from 0.3.5 to 0.3.6 (#41)
dependabot[bot] Apr 7, 2021
fb7cb77
Fix: nil pointer when use GeoIP2 to find IPv6 #43
Apr 10, 2021
043185d
Bump actions/upload-artifact from v2.2.2 to v2.2.3 (#42)
dependabot[bot] Apr 10, 2021
0c4408d
Bump actions/cache from v2.1.4 to v2.1.5 (#44)
dependabot[bot] Apr 16, 2021
5433ce4
update zx ipv6 database address
huyz-git Apr 19, 2021
f64b16a
Merge pull request #47 from huyz-git/master
zu1k Apr 19, 2021
badfff1
Bump docker/build-push-action from 2 to 2.4.0
dependabot[bot] May 12, 2021
ca9005a
Merge pull request #48 from zu1k/dependabot/github_actions/docker/bui…
zu1k May 16, 2021
c2868d7
Update FUNDING.yml
zu1k May 16, 2021
a202fbd
Bump actions/cache from 2.1.5 to 2.1.6 (#50)
dependabot[bot] Jul 30, 2021
833763e
Bump actions/upload-artifact from 2.2.3 to 2.2.4 (#51)
dependabot[bot] Jul 30, 2021
6b3ccc3
Bump docker/build-push-action from 2.4.0 to 2.6.1 (#52)
dependabot[bot] Jul 30, 2021
6d669ba
Bump github.com/spf13/cobra from 1.1.3 to 1.2.1 (#54)
dependabot[bot] Jul 30, 2021
a788bf3
update deps
Jul 30, 2021
e7ea663
Add type Entity
Jul 30, 2021
7a03f15
Add ParseLine
Jul 30, 2021
8cb2d50
feat: Define DB interface
Aug 2, 2021
40274f6
go fmt
Aug 2, 2021
592a2ea
color print
Aug 2, 2021
fa2bab4
fix entity parse
Aug 3, 2021
2d99679
fix entity parse
Aug 3, 2021
6b76f4a
feat: support db select
Aug 11, 2021
0151892
Merge pull request #57 from zu1k/refactor
zu1k Aug 11, 2021
bf5c917
update deps
Aug 11, 2021
ebb97d6
fix: ipv6 geoip init
Aug 11, 2021
8e87230
fix: Prevent domain name matching IP #64
Oct 26, 2021
17839a6
chore: Update dependences
Oct 26, 2021
e4b0253
fix: Trim result
Oct 26, 2021
cd1def5
fix: GitHub Actions docker
Oct 26, 2021
b0be871
add goland svg
Nov 4, 2021
1e116c8
chore: Update deps
Dec 16, 2021
4e22a5c
fix: Match IPv4 in IPv6 #70
Dec 16, 2021
0198f6f
fix: CName match #66
Dec 16, 2021
184fdd3
Delete docker.yml
Dec 16, 2021
c8b3130
Add version flag
Dec 17, 2021
57ecaa8
fix ipv4 in ipv6 parse
Dec 17, 2021
da557ed
Update Makefile to support M1 (#75)
wisecsj Dec 17, 2021
9100a6d
Add sha256sum for release
Dec 17, 2021
75d8173
fix color print in cmd.exe (#78)
zpcc Feb 8, 2022
b21c9b6
feat: Support ip2region
Feb 20, 2022
7637de1
docs: Update readme
Feb 20, 2022
9bd1395
fix: ip2region city
Feb 20, 2022
d1b584c
refactor: better download and error handle
Mar 2, 2022
6bc863c
refactor: project structure
Mar 2, 2022
cc95913
docs: Update readme
Mar 2, 2022
bf78867
docs: Update readme zh
Mar 2, 2022
b54eb6b
docs: Readme zh-CN first
Mar 3, 2022
b7b3575
chore(deps): bump actions/cache from 2 to 3 (#88)
dependabot[bot] Mar 26, 2022
daa93a0
chore(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#87)
dependabot[bot] Mar 26, 2022
fe447a3
chore: Update cdn database url
zu1k Apr 3, 2022
cf206dc
fix: CDN struct tag
zu1k Apr 3, 2022
0103e94
fix: go build workflow
zu1k Apr 3, 2022
fe9b941
fix: ZXIPv6 database download #91
Apr 10, 2022
303e235
feat: make update module flex
May 5, 2022
2cba310
Merge pull request #102 from linbuxiao/up
zu1k May 5, 2022
c0643f7
feat: Database from config
zu1k May 9, 2022
8078e86
fix: Geoip lang select
zu1k May 9, 2022
a92f6ff
chore: Update readme
zu1k May 9, 2022
31fe43c
Added support for IP2Location DB3 LITE
fengdelan May 17, 2022
222bd54
Merge pull request #105 from fengdelan/conf
zu1k May 17, 2022
44606cd
docs: Update readme zh
zu1k May 17, 2022
4482839
fix: ip2location language only support en
zu1k May 17, 2022
bd84bf8
misc: Add cdn backup link
zu1k May 24, 2022
f391935
feat: Support update db by direct download
zu1k May 24, 2022
5ddfad0
chore: Update github action deps
zu1k May 24, 2022
de5a8f2
deps: Update yaml to v3
zu1k May 26, 2022
74a3198
deps: Use some deops
zu1k Jun 10, 2022
b03c052
Add qqwry update notice
zu1k Jun 17, 2022
673e5f4
feat: Support ip2region xdb
zu1k Jun 27, 2022
6bf5d94
fix: CDN support regex
zu1k Jun 29, 2022
4599c05
chore: Add Aur release action:
zu1k Jun 29, 2022
44aed85
fix: Aur publish action use latest
zu1k Jun 29, 2022
22eb0fa
fix: Aur publish action use latest master
zu1k Jun 29, 2022
0793c04
chore: Add action for aur nali-go-git
zu1k Jun 30, 2022
38f974d
fix: use zu1k/aur-publish-action for aur release
zu1k Jun 30, 2022
58acea1
fix: trust dir before start aur docker
zu1k Jun 30, 2022
632efe8
fix: calc version out of docker
zu1k Jun 30, 2022
f172e8f
fix: Checkout all tags
zu1k Jun 30, 2022
0c7a1f8
chore: Add action for aur nali-go-bin
zu1k Jun 30, 2022
5b69187
docs: Update readme
zu1k Jun 30, 2022
2f1d164
fix: common download save to file
zu1k Jul 4, 2022
8e28030
feat: Add migration
zu1k Jul 6, 2022
88e59aa
fix typo
Jul 17, 2022
12a5ac2
Merge pull request #122 from Longway22/patch-1
zu1k Jul 17, 2022
c2a1ad8
chore: Update qqwry.date download url
zu1k Jul 21, 2022
40e1623
fix: gen nil config file
zu1k Jul 21, 2022
d37da69
chore: Update deps
zu1k Jul 21, 2022
faf39c2
Remove deprecated code
zu1k Jul 21, 2022
970d770
chore: go fmt
zu1k Jul 21, 2022
7d3c83d
chore: remove useless test code
zu1k Jul 21, 2022
43388e8
chore: Upload binaries to s3
zu1k Jul 24, 2022
45953fc
fix concurrent map write
lh1xc Jul 28, 2022
3709ae8
Merge pull request #125 from lhcn/concurrent_fix
zu1k Jul 28, 2022
4cffde1
chore: Update deps & publish to aur-git only when push
zu1k Jul 28, 2022
f358ba3
新增使用代理下载IP数据库
jingjingxyk Jul 28, 2022
da29bda
Merge pull request #126 from jingjingxyk/master
zu1k Jul 29, 2022
e86169b
fix: a problem that cannot read mtr output from pipe
mzz2017 Aug 14, 2022
264b952
fix: the continuous two \n case.
mzz2017 Aug 14, 2022
2072a5c
chore: format the import
mzz2017 Aug 14, 2022
a40fa68
fix: destroyed format
mzz2017 Aug 14, 2022
5b722a6
fix: keep data at EOF
mzz2017 Aug 14, 2022
24cdbcf
optimize: remove regexp and use bytes.IndexByte to improve the perfor…
mzz2017 Aug 14, 2022
eaeae3d
fix: annotation
mzz2017 Aug 14, 2022
8e68a77
Merge pull request #132 from mzz2017/master
zu1k Aug 15, 2022
8307d14
refactor: Simplified ScanLines
zu1k Aug 15, 2022
87d621f
chore: Update CI Go version to 1.19
zu1k Aug 15, 2022
fb00fa9
feat: Remove ip2region old db format support
zu1k Aug 15, 2022
ed0fe1d
deps: update deps
zu1k Aug 15, 2022
60bab5e
fix: quit & exit should exit nali
zu1k Aug 15, 2022
e1af0bc
feat: get ConfigDir and DataDir path from XDG env
zu1k Oct 5, 2022
0062ad9
change default dataDir and configDir
zu1k Oct 5, 2022
4625033
feat: auto migrate to new dir
zu1k Oct 6, 2022
5039161
fix: migration find old dir path
zu1k Oct 6, 2022
0631804
fix: migration move db to data dir
zu1k Oct 6, 2022
3efa0d1
Bump version to 0.6.0
zu1k Oct 17, 2022
b4e783e
refactor: new wry parsing implementation, supports concurrency
zu1k Oct 20, 2022
306babc
fix: Check wry db before query
zu1k Oct 20, 2022
2da7512
deps: update deps
zu1k Oct 20, 2022
fc9df8d
fix: check wry size before read header
zu1k Oct 20, 2022
b0bd277
feat: check db data after download
zu1k Oct 24, 2022
b29ad6f
chore: format
zu1k Oct 24, 2022
467ed54
Update dependabot.yml
zu1k Nov 8, 2022
f8f48ba
Add CodeQL workflow for GitHub code scanning
lgtm-migrator Nov 10, 2022
5cbba47
Merge pull request #151 from lgtm-migrator/codeql
zu1k Nov 10, 2022
a77165b
chore: update qqwry download link
zu1k Jan 8, 2023
8aebd93
fix: #155
zu1k Jan 8, 2023
2680523
docs: rm useless link
zu1k Jan 10, 2023
06e14b8
docs: update build test badge
zu1k Jan 10, 2023
aad0672
docs: update README_en.md (#156)
hezhizhen Jan 15, 2023
bb15705
chore: rm useless file
zu1k Jan 20, 2023
e196c68
chore: update deps
zu1k Feb 4, 2023
25b0af0
fix: auto migrate download link
zu1k Feb 4, 2023
b4dab20
chore: add download times badge
zu1k Feb 26, 2023
7c2d9e1
feat: optimize using [2]int
zu1k Mar 2, 2023
de355d1
fix: Update qqwry download url
zu1k Apr 24, 2023
748c5cf
fix crash and fix migration qqwry #161 (#162)
oldshensheep May 1, 2023
ff1449a
add flag -j/--json. json format output.
JasonTtu May 19, 2023
d6d26f7
Fix the difference in output between stdin and cmd input.
M09Ic May 19, 2023
36025d8
add json note
M09Ic May 20, 2023
05d9185
Fix the bug that the output format is different from the original ver…
M09Ic May 20, 2023
3819ae6
Add the source field to the json output.
M09Ic May 20, 2023
97cde2a
Fix the bug of json nested error
M09Ic May 20, 2023
56be0c6
revolt output behavior, making it consistent with the original.
M09Ic May 21, 2023
a0e6398
unified dbif Name() return values to db.Name values
M09Ic May 21, 2023
904c57e
move Result struct to type.go
M09Ic May 21, 2023
77c5bee
Merge pull request #165 from chainreactors/json
zu1k Aug 24, 2023
07409ff
chore: fmt code & upgrade deps
zu1k Aug 24, 2023
6462935
chore: make code scanning happy
zu1k Aug 24, 2023
20a0de6
chore(CI): upgrade golang to 1.21
zu1k Aug 24, 2023
f91569c
fix: panic when config dir access denied
oldshensheep Sep 19, 2023
43a3080
feat: implement self-update for nali (#177)
DateBro Sep 28, 2023
f2bec94
fix: fix self-update bugs
DateBro Sep 28, 2023
4123411
fix: delete write permission validation for files when self-update
DateBro Sep 29, 2023
4452272
test: added test for version.go
DateBro Oct 2, 2023
a4169d9
Merge pull request #178 from DateBro/master
zu1k Oct 2, 2023
ec2ae52
fix(CI): aur version
zu1k Oct 2, 2023
05746b1
fix: Query error causes idx not updated
zu1k Nov 24, 2023
0eb07b4
chore: update readme
zu1k Dec 11, 2023
214d935
feat: add country code to geoip json output
zu1k Dec 11, 2023
a1f4690
feat: geoip use default lang when selected not exist
zu1k Dec 21, 2023
dad26fd
chore: update deps
zu1k Dec 21, 2023
559ba29
chore: replace ioutil functions (#191)
hezhizhen May 12, 2024
2e758d3
chore: use FW27623/qqwry instead of HMBSbige/qqwry (#196)
kingcanfish Aug 27, 2024
8c17abb
feat: Handle NAT64 address query (#200)
cyyself Dec 30, 2024
435f9b2
feat: add windows-arm64 support in WINDOWS_ARCH_LIST (#202)
Laotree Dec 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: delete write permission validation for files when self-update
  • Loading branch information
DateBro committed Sep 29, 2023
commit 4123411ecbeff9622326cdf324de7dff2e8328fc
12 changes: 0 additions & 12 deletions internal/repo/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ func update(asset io.Reader, cmdPath string) error {
if !canWriteDir(updateDir) {
return fmt.Errorf("no write permissions on the directory, consider updating nali manually")
}
if !canWriteFile(cmdPath) {
return fmt.Errorf("no write permissions on the executable, consider updating nali manually")
}

// Copy the contents of new binary to a new executable file
newPath := filepath.Join(updateDir, fmt.Sprintf(".%s.new", filename))
Expand Down Expand Up @@ -184,12 +181,3 @@ func canWriteDir(path string) bool {

return err == nil
}

func canWriteFile(path string) bool {
f, err := os.OpenFile(path, os.O_WRONLY, 0644)
if err == nil {
defer f.Close()
}

return err == nil
}