Skip to content

Commit

Permalink
fix: mod name major version suffix v2
Browse files Browse the repository at this point in the history
  • Loading branch information
haruue committed May 18, 2024
1 parent 15e5846 commit 0c198ab
Show file tree
Hide file tree
Showing 70 changed files with 126 additions and 126 deletions.
28 changes: 14 additions & 14 deletions app/cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ import (
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/apernet/hysteria/app/internal/forwarding"
"github.com/apernet/hysteria/app/internal/http"
"github.com/apernet/hysteria/app/internal/proxymux"
"github.com/apernet/hysteria/app/internal/redirect"
"github.com/apernet/hysteria/app/internal/sockopts"
"github.com/apernet/hysteria/app/internal/socks5"
"github.com/apernet/hysteria/app/internal/tproxy"
"github.com/apernet/hysteria/app/internal/tun"
"github.com/apernet/hysteria/app/internal/url"
"github.com/apernet/hysteria/app/internal/utils"
"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/extras/correctnet"
"github.com/apernet/hysteria/extras/obfs"
"github.com/apernet/hysteria/extras/transport/udphop"
"github.com/apernet/hysteria/app/v2/internal/forwarding"
"github.com/apernet/hysteria/app/v2/internal/http"
"github.com/apernet/hysteria/app/v2/internal/proxymux"
"github.com/apernet/hysteria/app/v2/internal/redirect"
"github.com/apernet/hysteria/app/v2/internal/sockopts"
"github.com/apernet/hysteria/app/v2/internal/socks5"
"github.com/apernet/hysteria/app/v2/internal/tproxy"
"github.com/apernet/hysteria/app/v2/internal/tun"
"github.com/apernet/hysteria/app/v2/internal/url"
"github.com/apernet/hysteria/app/v2/internal/utils"
"github.com/apernet/hysteria/core/v2/client"
"github.com/apernet/hysteria/extras/v2/correctnet"
"github.com/apernet/hysteria/extras/v2/obfs"
"github.com/apernet/hysteria/extras/v2/transport/udphop"
)

// Client flags
Expand Down
2 changes: 1 addition & 1 deletion app/cmd/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

// pingCmd represents the ping command
Expand Down
16 changes: 8 additions & 8 deletions app/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/apernet/hysteria/app/internal/utils"
"github.com/apernet/hysteria/core/server"
"github.com/apernet/hysteria/extras/auth"
"github.com/apernet/hysteria/extras/correctnet"
"github.com/apernet/hysteria/extras/masq"
"github.com/apernet/hysteria/extras/obfs"
"github.com/apernet/hysteria/extras/outbounds"
"github.com/apernet/hysteria/extras/trafficlogger"
"github.com/apernet/hysteria/app/v2/internal/utils"
"github.com/apernet/hysteria/core/v2/server"
"github.com/apernet/hysteria/extras/v2/auth"
"github.com/apernet/hysteria/extras/v2/correctnet"
"github.com/apernet/hysteria/extras/v2/masq"
"github.com/apernet/hysteria/extras/v2/obfs"
"github.com/apernet/hysteria/extras/v2/outbounds"
"github.com/apernet/hysteria/extras/v2/trafficlogger"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions app/cmd/speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/apernet/hysteria/core/client"
hyErrors "github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/extras/outbounds"
"github.com/apernet/hysteria/extras/outbounds/speedtest"
"github.com/apernet/hysteria/core/v2/client"
hyErrors "github.com/apernet/hysteria/core/v2/errors"
"github.com/apernet/hysteria/extras/v2/outbounds"
"github.com/apernet/hysteria/extras/v2/outbounds/speedtest"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions app/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/apernet/hysteria/app/internal/utils"
"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/app/v2/internal/utils"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions app/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/apernet/hysteria/app
module github.com/apernet/hysteria/app/v2

go 1.21

require (
github.com/apernet/go-tproxy v0.0.0-20230809025308-8f4723fd742f
github.com/apernet/hysteria/core v0.0.0-00010101000000-000000000000
github.com/apernet/hysteria/extras v0.0.0-00010101000000-000000000000
github.com/apernet/hysteria/core/v2 v2.0.0-00010101000000-000000000000
github.com/apernet/hysteria/extras/v2 v2.0.0-00010101000000-000000000000
github.com/apernet/sing-tun v0.2.6-0.20240323130332-b9f6511036ad
github.com/caddyserver/certmagic v0.17.2
github.com/mdp/qrterminal/v3 v3.1.1
Expand Down Expand Up @@ -66,6 +66,6 @@ require (
rsc.io/qr v0.2.0 // indirect
)

replace github.com/apernet/hysteria/core => ../core
replace github.com/apernet/hysteria/core/v2 => ../core

replace github.com/apernet/hysteria/extras => ../extras
replace github.com/apernet/hysteria/extras/v2 => ../extras
2 changes: 1 addition & 1 deletion app/internal/forwarding/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"net"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type TCPTunnel struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/forwarding/tcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/apernet/hysteria/app/internal/utils_test"
"github.com/apernet/hysteria/app/v2/internal/utils_test"
)

func TestTCPTunnel(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/forwarding/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync/atomic"
"time"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/forwarding/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/apernet/hysteria/app/internal/utils_test"
"github.com/apernet/hysteria/app/v2/internal/utils_test"
)

func TestUDPTunnel(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"time"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/http/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/proxymux/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net"
"sync"

"github.com/apernet/hysteria/extras/correctnet"
"github.com/apernet/hysteria/extras/v2/correctnet"
)

type muxManager struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/proxymux/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/apernet/hysteria/app/internal/proxymux/internal/mocks"
"github.com/apernet/hysteria/app/v2/internal/proxymux/internal/mocks"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion app/internal/redirect/tcp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"syscall"
"unsafe"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/redirect/tcp_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"net"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type TCPRedirect struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/socks5/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/txthinking/socks5"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const udpBufferSize = 4096
Expand Down
2 changes: 1 addition & 1 deletion app/internal/socks5/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/apernet/hysteria/app/internal/utils_test"
"github.com/apernet/hysteria/app/v2/internal/utils_test"
)

func TestServer(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/tproxy/tcp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"

"github.com/apernet/go-tproxy"
"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type TCPTProxy struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/tproxy/tcp_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"net"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type TCPTProxy struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/tproxy/udp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/apernet/go-tproxy"
"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/tproxy/udp_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net"
"time"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type UDPTProxy struct {
Expand Down
2 changes: 1 addition & 1 deletion app/internal/tun/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/sagernet/sing/common/network"
"go.uber.org/zap"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type Server struct {
Expand Down
4 changes: 2 additions & 2 deletions app/internal/utils/geoloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"time"

"github.com/apernet/hysteria/extras/outbounds/acl"
"github.com/apernet/hysteria/extras/outbounds/acl/v2geo"
"github.com/apernet/hysteria/extras/v2/outbounds/acl"
"github.com/apernet/hysteria/extras/v2/outbounds/acl/v2geo"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/utils/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"time"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/internal/utils_test/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"
"time"

"github.com/apernet/hysteria/core/client"
"github.com/apernet/hysteria/core/v2/client"
)

type MockEchoHyClient struct{}
Expand Down
2 changes: 1 addition & 1 deletion app/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/apernet/hysteria/app/cmd"
import "github.com/apernet/hysteria/app/v2/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion core/client/.mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ with-expecter: true
inpackage: true
dir: .
packages:
github.com/apernet/hysteria/core/client:
github.com/apernet/hysteria/core/v2/client:
interfaces:
udpIO:
config:
Expand Down
8 changes: 4 additions & 4 deletions core/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"net/url"
"time"

coreErrs "github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/core/internal/congestion"
"github.com/apernet/hysteria/core/internal/protocol"
"github.com/apernet/hysteria/core/internal/utils"
coreErrs "github.com/apernet/hysteria/core/v2/errors"
"github.com/apernet/hysteria/core/v2/internal/congestion"
"github.com/apernet/hysteria/core/v2/internal/protocol"
"github.com/apernet/hysteria/core/v2/internal/utils"

"github.com/apernet/quic-go"
"github.com/apernet/quic-go/http3"
Expand Down
4 changes: 2 additions & 2 deletions core/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net"
"time"

"github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/core/internal/pmtud"
"github.com/apernet/hysteria/core/v2/errors"
"github.com/apernet/hysteria/core/v2/internal/pmtud"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/client/mock_udpIO.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/client/reconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net"
"sync"

coreErrs "github.com/apernet/hysteria/core/errors"
coreErrs "github.com/apernet/hysteria/core/v2/errors"
)

// reconnectableClientImpl is a wrapper of Client, which can reconnect when the connection is closed,
Expand Down
6 changes: 3 additions & 3 deletions core/client/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/apernet/quic-go"

coreErrs "github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/core/internal/frag"
"github.com/apernet/hysteria/core/internal/protocol"
coreErrs "github.com/apernet/hysteria/core/v2/errors"
"github.com/apernet/hysteria/core/v2/internal/frag"
"github.com/apernet/hysteria/core/v2/internal/protocol"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions core/client/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/mock"
"go.uber.org/goleak"

coreErrs "github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/core/internal/protocol"
coreErrs "github.com/apernet/hysteria/core/v2/errors"
"github.com/apernet/hysteria/core/v2/internal/protocol"
)

func TestUDPSessionManager(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/apernet/hysteria/core
module github.com/apernet/hysteria/core/v2

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion core/internal/congestion/bbr/bbr_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/apernet/quic-go/congestion"

"github.com/apernet/hysteria/core/internal/congestion/common"
"github.com/apernet/hysteria/core/v2/internal/congestion/common"
)

// BbrSender implements BBR congestion control algorithm. BBR aims to estimate
Expand Down
Loading

0 comments on commit 0c198ab

Please sign in to comment.