-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
985 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
FROM golang:alpine as builder | ||
|
||
RUN apk add --no-cache make git | ||
WORKDIR /nali-src | ||
COPY . /nali-src | ||
RUN go mod download && \ | ||
make docker && \ | ||
mv ./bin/nali-docker /nali | ||
|
||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /nali / | ||
FROM golang:alpine as builder | ||
|
||
RUN apk add --no-cache make git | ||
WORKDIR /nali-src | ||
COPY . /nali-src | ||
RUN go mod download && \ | ||
make docker && \ | ||
mv ./bin/nali-docker /nali | ||
|
||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /nali / | ||
ENTRYPOINT ["/nali"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/zu1k/nali/internal/constant" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/spf13/viper" | ||
) | ||
|
||
// infoCmd represents the info command | ||
var infoCmd = &cobra.Command{ | ||
Use: "info", | ||
Short: "get the necessary information of nali", | ||
Long: `get the necessary information of nali`, | ||
Example: "nali info", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Println("Nali Version: ", constant.Version) | ||
fmt.Println("Config Dir Path: ", constant.ConfigDirPath) | ||
fmt.Println("DB Data Dir Path: ", constant.DataDirPath) | ||
|
||
fmt.Println("Selected IPv4 DB: ", viper.GetString("selected.ipv4")) | ||
fmt.Println("Selected IPv6 DB: ", viper.GetString("selected.ipv6")) | ||
fmt.Println("Selected CDN DB: ", viper.GetString("selected.cdn")) | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(infoCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,66 @@ | ||
module github.com/zu1k/nali | ||
|
||
go 1.18 | ||
go 1.19 | ||
|
||
require ( | ||
github.com/adrg/xdg v0.4.0 | ||
github.com/fatih/color v1.13.0 | ||
github.com/gin-gonic/gin v1.7.7 | ||
github.com/fatih/color v1.15.0 | ||
github.com/google/go-github/v55 v55.0.0 | ||
github.com/google/martian v2.1.0+incompatible | ||
github.com/ip2location/ip2location-go/v9 v9.2.0 | ||
github.com/ipipdotnet/ipdb-go v1.3.1 | ||
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20221017063954-c5c24655eb63 | ||
github.com/oschwald/geoip2-golang v1.7.0 | ||
github.com/ip2location/ip2location-go/v9 v9.6.0 | ||
github.com/ipipdotnet/ipdb-go v1.3.3 | ||
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230731060429-6ed8bf011875 | ||
github.com/oschwald/geoip2-golang v1.9.0 | ||
github.com/saracen/go7z v0.0.0-20191010121135-9c09b6bd7fda | ||
github.com/spf13/cobra v1.4.0 | ||
github.com/spf13/viper v1.11.0 | ||
golang.org/x/text v0.3.7 | ||
github.com/spf13/cobra v1.7.0 | ||
github.com/spf13/viper v1.16.0 | ||
golang.org/x/text v0.12.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/fsnotify/fsnotify v1.5.1 // indirect | ||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect | ||
github.com/bytedance/sonic v1.9.1 // indirect | ||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect | ||
github.com/cloudflare/circl v1.3.3 // indirect | ||
github.com/fsnotify/fsnotify v1.6.0 // indirect | ||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect | ||
github.com/gin-contrib/sse v0.1.0 // indirect | ||
github.com/go-playground/locales v0.13.0 // indirect | ||
github.com/go-playground/universal-translator v0.17.0 // indirect | ||
github.com/go-playground/validator/v10 v10.4.1 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/gin-gonic/gin v1.9.1 // indirect | ||
github.com/go-playground/locales v0.14.1 // indirect | ||
github.com/go-playground/universal-translator v0.18.1 // indirect | ||
github.com/go-playground/validator/v10 v10.14.0 // indirect | ||
github.com/goccy/go-json v0.10.2 // indirect | ||
github.com/google/go-querystring v1.1.0 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/kr/pretty v0.3.0 // indirect | ||
github.com/leodido/go-urn v1.2.0 // indirect | ||
github.com/magiconair/properties v1.8.6 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mitchellh/mapstructure v1.4.3 // indirect | ||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect | ||
github.com/leodido/go-urn v1.2.4 // indirect | ||
github.com/magiconair/properties v1.8.7 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.19 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/oschwald/maxminddb-golang v1.9.0 // indirect | ||
github.com/pelletier/go-toml v1.9.4 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect | ||
github.com/rogpeppe/go-internal v1.8.0 // indirect | ||
github.com/oschwald/maxminddb-golang v1.12.0 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.9 // indirect | ||
github.com/saracen/go7z-fixtures v0.0.0-20190623165746-aa6b8fba1d2f // indirect | ||
github.com/saracen/solidblock v0.0.0-20190426153529-45df20abab6f // indirect | ||
github.com/spf13/afero v1.8.2 // indirect | ||
github.com/spf13/cast v1.4.1 // indirect | ||
github.com/spf13/afero v1.9.5 // indirect | ||
github.com/spf13/cast v1.5.1 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/subosito/gotenv v1.2.0 // indirect | ||
github.com/ugorji/go/codec v1.1.7 // indirect | ||
github.com/ulikunitz/xz v0.5.10 // indirect | ||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect | ||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect | ||
golang.org/x/tools v0.1.7 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
gopkg.in/ini.v1 v1.66.4 // indirect | ||
gopkg.in/yaml.v3 v3.0.0 // indirect | ||
github.com/subosito/gotenv v1.6.0 // indirect | ||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
github.com/ugorji/go/codec v1.2.11 // indirect | ||
github.com/ulikunitz/xz v0.5.11 // indirect | ||
golang.org/x/arch v0.3.0 // indirect | ||
golang.org/x/crypto v0.12.0 // indirect | ||
golang.org/x/net v0.10.0 // indirect | ||
golang.org/x/sys v0.11.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/ini.v1 v1.67.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
lukechampine.com/uint128 v1.3.0 // indirect | ||
) |
Oops, something went wrong.