rename repo

This commit is contained in:
naiba 2024-11-28 19:38:54 +08:00
parent 9d45bf6601
commit 3cce7ebf01
51 changed files with 117 additions and 117 deletions

2
.github/sync.py vendored
View File

@ -7,7 +7,7 @@ from github import Github
def get_github_latest_release():
g = Github()
repo = g.get_repo("naiba/nezha")
repo = g.get_repo("nezhahq/nezha")
release = repo.get_latest_release()
if release:
print(f"Latest release tag is: {release.tag_name}")

View File

@ -214,7 +214,7 @@ jobs:
run: |
GHCR_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
if [ ${{ github.repository_owner }} = "naiba" ]
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard")
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/nezhahq/nezha-dashboard")
else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
fi
echo "GHCR_IMAGE_NAME=$GHCR_IMAGE_NAME" >> $GITHUB_OUTPUT

View File

@ -9,7 +9,7 @@ builds:
- CC=aarch64-linux-gnu-gcc
ldflags:
- -s -w
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
- -X github.com/nezhahq/nezha/service/singleton.Version={{.Version}}
- -extldflags "-static -fpic"
flags:
- -trimpath
@ -26,7 +26,7 @@ builds:
- CC=x86_64-linux-gnu-gcc
ldflags:
- -s -w
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
- -X github.com/nezhahq/nezha/service/singleton.Version={{.Version}}
- -extldflags "-static -fpic"
flags:
- -trimpath
@ -43,7 +43,7 @@ builds:
- CC=s390x-linux-gnu-gcc
ldflags:
- -s -w
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
- -X github.com/nezhahq/nezha/service/singleton.Version={{.Version}}
- -extldflags "-static -fpic"
flags:
- -trimpath
@ -60,7 +60,7 @@ builds:
- CC=x86_64-w64-mingw32-gcc
ldflags:
- -s -w
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
- -X github.com/nezhahq/nezha/service/singleton.Version={{.Version}}
- -extldflags "-static -fpic"
flags:
- -trimpath

View File

@ -4,7 +4,7 @@
<br>
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
<br><br>
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&style=for-the-badge&logo=github&label=Dashboard">&nbsp;<img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.20.2-brightgreen?style=for-the-badge&logo=linux">
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/nezhahq/nezha?color=brightgreen&style=for-the-badge&logo=github&label=Dashboard">&nbsp;<img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.20.2-brightgreen?style=for-the-badge&logo=linux">
<br>
<br>
<p>:trollface: <b>Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.</b></p>
@ -101,4 +101,4 @@ You can change the dashboard language in the settings page (`/setting`) after th
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=naiba/nezha&type=Timeline)](https://star-history.com/#naiba/nezha&Timeline)
[![Star History Chart](https://api.star-history.com/svg?repos=nezhahq/nezha&type=Timeline)](https://star-history.com/#nezhahq/nezha&Timeline)

View File

@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List Alert rules

View File

@ -15,10 +15,10 @@ import (
swaggerfiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"github.com/naiba/nezha/cmd/dashboard/controller/waf"
docs "github.com/naiba/nezha/cmd/dashboard/docs"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/cmd/dashboard/controller/waf"
docs "github.com/nezhahq/nezha/cmd/dashboard/docs"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
func ServeWeb() http.Handler {

View File

@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List schedule tasks

View File

@ -7,8 +7,8 @@ import (
"github.com/jinzhu/copier"
"golang.org/x/net/idna"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List DDNS Profiles

View File

@ -7,12 +7,12 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/hashicorp/go-uuid"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/pkg/websocketx"
"github.com/naiba/nezha/proto"
"github.com/naiba/nezha/service/rpc"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/websocketx"
"github.com/nezhahq/nezha/proto"
"github.com/nezhahq/nezha/service/rpc"
"github.com/nezhahq/nezha/service/singleton"
)
// Create FM session

View File

@ -9,10 +9,10 @@ import (
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"github.com/naiba/nezha/cmd/dashboard/controller/waf"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/cmd/dashboard/controller/waf"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/service/singleton"
)
func initParams() *jwt.GinJWTMiddleware {

View File

@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List NAT Profiles

View File

@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
"gorm.io/gorm"
)

View File

@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List notification group

View File

@ -6,10 +6,10 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
pb "github.com/naiba/nezha/proto"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
pb "github.com/nezhahq/nezha/proto"
"github.com/nezhahq/nezha/service/singleton"
)
// List server

View File

@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List server group

View File

@ -8,8 +8,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
"gorm.io/gorm"
)

View File

@ -3,8 +3,8 @@ package controller
import (
"github.com/gin-gonic/gin"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List settings

View File

@ -6,12 +6,12 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/hashicorp/go-uuid"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/pkg/websocketx"
"github.com/naiba/nezha/proto"
"github.com/naiba/nezha/service/rpc"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/websocketx"
"github.com/nezhahq/nezha/proto"
"github.com/nezhahq/nezha/service/rpc"
"github.com/nezhahq/nezha/service/singleton"
)
// Create web ssh terminal

View File

@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// Get profile

View File

@ -3,8 +3,8 @@ package controller
import (
"github.com/gin-gonic/gin"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
// List blocked addresses

View File

@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/service/singleton"
)
//go:embed waf.html

View File

@ -10,9 +10,9 @@ import (
"github.com/gorilla/websocket"
"golang.org/x/sync/singleflight"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/service/singleton"
)
var upgrader *websocket.Upgrader

View File

@ -17,11 +17,11 @@ import (
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
"github.com/naiba/nezha/cmd/dashboard/controller"
"github.com/naiba/nezha/cmd/dashboard/rpc"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/proto"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/cmd/dashboard/controller"
"github.com/nezhahq/nezha/cmd/dashboard/rpc"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/proto"
"github.com/nezhahq/nezha/service/singleton"
)
type DashboardCliParam struct {

View File

@ -12,11 +12,11 @@ import (
"google.golang.org/grpc/peer"
"github.com/hashicorp/go-uuid"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/proto"
rpcService "github.com/naiba/nezha/service/rpc"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/nezhahq/nezha/proto"
rpcService "github.com/nezhahq/nezha/service/rpc"
"github.com/nezhahq/nezha/service/singleton"
)
func ServeRPC() *grpc.Server {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/naiba/nezha
module github.com/nezhahq/nezha
go 1.21.0

View File

@ -1,7 +1,7 @@
package model
import (
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
"gorm.io/gorm"
)

View File

@ -12,7 +12,7 @@ import (
"github.com/knadh/koanf/v2"
"gopkg.in/yaml.v3"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
)
const (

View File

@ -3,7 +3,7 @@ package model
import (
"time"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
"github.com/robfig/cron/v3"
"gorm.io/gorm"
)

View File

@ -1,7 +1,7 @@
package model
import (
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
"gorm.io/gorm"
)

View File

@ -3,7 +3,7 @@ package model
import (
"fmt"
pb "github.com/naiba/nezha/proto"
pb "github.com/nezhahq/nezha/proto"
)
const (

View File

@ -9,7 +9,7 @@ import (
"strings"
"time"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
)
const (

View File

@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
)
const (

View File

@ -7,8 +7,8 @@ import (
"gorm.io/gorm"
"github.com/naiba/nezha/pkg/utils"
pb "github.com/naiba/nezha/proto"
"github.com/nezhahq/nezha/pkg/utils"
pb "github.com/nezhahq/nezha/proto"
)
type Server struct {

View File

@ -7,8 +7,8 @@ import (
"github.com/robfig/cron/v3"
"gorm.io/gorm"
"github.com/naiba/nezha/pkg/utils"
pb "github.com/naiba/nezha/proto"
"github.com/nezhahq/nezha/pkg/utils"
pb "github.com/nezhahq/nezha/proto"
)
const (

View File

@ -5,7 +5,7 @@ import (
"math/big"
"time"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/pkg/utils"
"gorm.io/gorm"
)

View File

@ -10,8 +10,8 @@ import (
"github.com/libdns/libdns"
"github.com/miekg/dns"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
)
var (

View File

@ -9,8 +9,8 @@ import (
"strings"
"github.com/libdns/libdns"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
)
const (

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"github.com/naiba/nezha/model"
"github.com/nezhahq/nezha/model"
)
var (

View File

@ -5,7 +5,7 @@ import (
"io"
"sync/atomic"
"github.com/naiba/nezha/proto"
"github.com/nezhahq/nezha/proto"
)
var _ io.ReadWriteCloser = (*IOStreamWrapper)(nil)

View File

@ -11,8 +11,8 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/service/singleton"
)
type authHandler struct {

View File

@ -7,7 +7,7 @@ import (
"sync/atomic"
"time"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/service/singleton"
)
type ioStreamContext struct {

View File

@ -8,15 +8,15 @@ import (
"sync"
"time"
"github.com/naiba/nezha/pkg/ddns"
geoipx "github.com/naiba/nezha/pkg/geoip"
"github.com/naiba/nezha/pkg/grpcx"
"github.com/nezhahq/nezha/pkg/ddns"
geoipx "github.com/nezhahq/nezha/pkg/geoip"
"github.com/nezhahq/nezha/pkg/grpcx"
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
pb "github.com/naiba/nezha/proto"
"github.com/naiba/nezha/service/singleton"
"github.com/nezhahq/nezha/model"
pb "github.com/nezhahq/nezha/proto"
"github.com/nezhahq/nezha/service/singleton"
)
var _ pb.NezhaServiceServer = (*NezhaHandler)(nil)

View File

@ -8,7 +8,7 @@ import (
"github.com/jinzhu/copier"
"github.com/naiba/nezha/model"
"github.com/nezhahq/nezha/model"
)
const (

View File

@ -10,9 +10,9 @@ import (
"github.com/robfig/cron/v3"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
pb "github.com/naiba/nezha/proto"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
pb "github.com/nezhahq/nezha/proto"
)
var (

View File

@ -8,11 +8,11 @@ import (
"github.com/libdns/cloudflare"
tencentcloud "github.com/nezhahq/libdns-tencentcloud"
"github.com/naiba/nezha/model"
ddns2 "github.com/naiba/nezha/pkg/ddns"
"github.com/naiba/nezha/pkg/ddns/dummy"
"github.com/naiba/nezha/pkg/ddns/webhook"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
ddns2 "github.com/nezhahq/nezha/pkg/ddns"
"github.com/nezhahq/nezha/pkg/ddns/dummy"
"github.com/nezhahq/nezha/pkg/ddns/webhook"
"github.com/nezhahq/nezha/pkg/utils"
)
var (

View File

@ -6,7 +6,7 @@ import (
"fmt"
"log"
"github.com/naiba/nezha/pkg/i18n"
"github.com/nezhahq/nezha/pkg/i18n"
)
const domain = "nezha"

View File

@ -4,8 +4,8 @@ import (
"slices"
"sync"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
)
var (

View File

@ -7,8 +7,8 @@ import (
"sync"
"time"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
)
const (

View File

@ -4,7 +4,7 @@ import (
"sort"
"sync"
"github.com/naiba/nezha/model"
"github.com/nezhahq/nezha/model"
)
var (

View File

@ -8,8 +8,8 @@ import (
"sync"
"time"
"github.com/naiba/nezha/model"
pb "github.com/naiba/nezha/proto"
"github.com/nezhahq/nezha/model"
pb "github.com/nezhahq/nezha/proto"
)
const (

View File

@ -8,8 +8,8 @@ import (
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"github.com/nezhahq/nezha/model"
"github.com/nezhahq/nezha/pkg/utils"
)
var Version = "debug"