mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-23 01:14:46 +07:00
feat: rename package
This commit is contained in:
parent
6fba4f8570
commit
ea409f16d5
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
*.o
|
||||
bpf_bpfeb.go
|
||||
bpf_bpfel.go
|
||||
dae
|
||||
|
15
Makefile
15
Makefile
@ -10,11 +10,16 @@ CLANG ?= clang
|
||||
STRIP ?= llvm-strip
|
||||
CFLAGS := -O2 -g -Wall -Werror $(CFLAGS)
|
||||
|
||||
.PHONY: generate
|
||||
.PHONY: ebpf dae
|
||||
|
||||
all: ebpf dae
|
||||
|
||||
# $BPF_CLANG is used in go:generate invocations.
|
||||
generate: export BPF_CLANG := $(CLANG)
|
||||
generate: export BPF_STRIP := $(STRIP)
|
||||
generate: export BPF_CFLAGS := $(CFLAGS)
|
||||
generate:
|
||||
ebpf: export BPF_CLANG := $(CLANG)
|
||||
ebpf: export BPF_STRIP := $(STRIP)
|
||||
ebpf: export BPF_CFLAGS := $(CFLAGS)
|
||||
ebpf:
|
||||
go generate ./component/control/...
|
||||
|
||||
dae: ebpf
|
||||
go build -ldflags "-s -w" .
|
@ -9,12 +9,12 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/common/consts"
|
||||
"foo/component/outbound"
|
||||
"foo/component/outbound/dialer"
|
||||
"foo/component/routing"
|
||||
"foo/pkg/pool"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/component/outbound"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/routing"
|
||||
"github.com/v2rayA/dae/pkg/pool"
|
||||
"github.com/cilium/ebpf"
|
||||
"github.com/cilium/ebpf/rlimit"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
@ -7,8 +7,8 @@ package control
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/cilium/ebpf"
|
||||
"golang.org/x/net/dns/dnsmessage"
|
||||
"net/netip"
|
||||
|
@ -6,7 +6,7 @@
|
||||
package control
|
||||
|
||||
import (
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -7,9 +7,9 @@ package control
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/common/consts"
|
||||
"foo/component/routing"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/component/routing"
|
||||
"github.com/cilium/ebpf"
|
||||
"net/netip"
|
||||
"strconv"
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"golang.org/x/sys/unix"
|
||||
"io"
|
||||
"net"
|
||||
|
@ -8,8 +8,8 @@ package control
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"foo/common/consts"
|
||||
"foo/pkg/pool"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/pkg/pool"
|
||||
"golang.org/x/net/dns/dnsmessage"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
@ -7,7 +7,7 @@ package control
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/pkg/pool"
|
||||
"github.com/v2rayA/dae/pkg/pool"
|
||||
"golang.org/x/net/proxy"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
@ -6,7 +6,7 @@
|
||||
package control
|
||||
|
||||
import (
|
||||
"foo/common"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/cilium/ebpf"
|
||||
"net/netip"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@
|
||||
package dialer
|
||||
|
||||
import (
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/mzz2017/softwind/pkg/fastrand"
|
||||
"github.com/sirupsen/logrus"
|
||||
"sync"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/mzz2017/softwind/pkg/fastrand"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/proxy"
|
||||
|
@ -2,7 +2,7 @@ package http
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/mzz2017/softwind/protocol/http"
|
||||
"gopkg.in/yaml.v3"
|
||||
"net"
|
||||
|
@ -3,9 +3,9 @@ package shadowsocks
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/component/outbound/dialer"
|
||||
"foo/component/outbound/dialer/transport/simpleobfs"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer/transport/simpleobfs"
|
||||
"github.com/mzz2017/softwind/protocol"
|
||||
"github.com/mzz2017/softwind/protocol/shadowsocks"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
@ -3,8 +3,8 @@ package shadowsocksr
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
ssr "github.com/v2rayA/shadowsocksR/client"
|
||||
"gopkg.in/yaml.v3"
|
||||
"net"
|
||||
|
@ -2,7 +2,7 @@ package socks
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/nadoo/glider/proxy"
|
||||
"github.com/nadoo/glider/proxy/socks4"
|
||||
"github.com/nadoo/glider/proxy/socks5"
|
||||
|
@ -2,10 +2,10 @@ package trojan
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/component/outbound/dialer"
|
||||
"foo/component/outbound/dialer/transport/tls"
|
||||
"foo/component/outbound/dialer/transport/ws"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer/transport/tls"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer/transport/ws"
|
||||
"github.com/mzz2017/softwind/protocol"
|
||||
"github.com/mzz2017/softwind/transport/grpc"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
@ -3,10 +3,10 @@ package v2ray
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"foo/common"
|
||||
"foo/component/outbound/dialer"
|
||||
"foo/component/outbound/dialer/transport/tls"
|
||||
"foo/component/outbound/dialer/transport/ws"
|
||||
"github.com/v2rayA/dae/common"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer/transport/tls"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer/transport/ws"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/mzz2017/softwind/protocol"
|
||||
"github.com/mzz2017/softwind/transport/grpc"
|
||||
|
@ -7,8 +7,8 @@ package outbound
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common/consts"
|
||||
"foo/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/proxy"
|
||||
"net"
|
||||
|
@ -6,9 +6,9 @@
|
||||
package outbound
|
||||
|
||||
import (
|
||||
"foo/common/consts"
|
||||
"foo/component/outbound/dialer"
|
||||
"foo/pkg/logger"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/component/outbound/dialer"
|
||||
"github.com/v2rayA/dae/pkg/logger"
|
||||
"github.com/mzz2017/softwind/pkg/fastrand"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -6,12 +6,12 @@
|
||||
package outbound
|
||||
|
||||
import (
|
||||
_ "foo/component/outbound/dialer/http"
|
||||
_ "foo/component/outbound/dialer/shadowsocks"
|
||||
_ "foo/component/outbound/dialer/shadowsocksr"
|
||||
_ "foo/component/outbound/dialer/socks"
|
||||
_ "foo/component/outbound/dialer/trojan"
|
||||
_ "foo/component/outbound/dialer/v2ray"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/http"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/shadowsocks"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/shadowsocksr"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/socks"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/trojan"
|
||||
_ "github.com/v2rayA/dae/component/outbound/dialer/v2ray"
|
||||
_ "github.com/mzz2017/softwind/protocol/shadowsocks"
|
||||
_ "github.com/mzz2017/softwind/protocol/trojanc"
|
||||
_ "github.com/mzz2017/softwind/protocol/vless"
|
||||
|
@ -7,12 +7,12 @@ package routing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
consts2 "foo/common/consts"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"net/netip"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var FakeOutbound_AND = consts2.OutboundLogicalAnd.String()
|
||||
var FakeOutbound_AND = consts.OutboundLogicalAnd.String()
|
||||
|
||||
type MatcherBuilder interface {
|
||||
AddDomain(key string, values []string, outbound string)
|
||||
@ -20,8 +20,8 @@ type MatcherBuilder interface {
|
||||
AddPort(values [][2]int, outbound string)
|
||||
AddSource(values []netip.Prefix, outbound string)
|
||||
AddSourcePort(values [][2]int, outbound string)
|
||||
AddNetwork(values consts2.NetworkType, outbound string)
|
||||
AddIpVersion(values consts2.IpVersion, outbound string)
|
||||
AddNetwork(values consts.NetworkType, outbound string)
|
||||
AddIpVersion(values consts.IpVersion, outbound string)
|
||||
AddMac(values [][6]byte, outbound string)
|
||||
AddFinal(outbound string)
|
||||
AddAnyBefore(key string, values []string, outbound string)
|
||||
@ -92,8 +92,8 @@ func (d *DefaultMatcherBuilder) AddIp(values []netip.Prefix, outbound string)
|
||||
func (d *DefaultMatcherBuilder) AddPort(values [][2]int, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddSource(values []netip.Prefix, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddSourcePort(values [][2]int, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddNetwork(values consts2.NetworkType, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddIpVersion(values consts2.IpVersion, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddNetwork(values consts.NetworkType, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddIpVersion(values consts.IpVersion, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddMac(values [][6]byte, outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddFinal(outbound string) {}
|
||||
func (d *DefaultMatcherBuilder) AddAnyBefore(key string, values []string, outbound string) {}
|
||||
|
@ -7,9 +7,9 @@ package routing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common/assets"
|
||||
"foo/common/consts"
|
||||
"foo/pkg/geodata"
|
||||
"github.com/v2rayA/dae/common/assets"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/v2rayA/dae/pkg/geodata"
|
||||
"github.com/sirupsen/logrus"
|
||||
"net/netip"
|
||||
"sort"
|
||||
|
@ -7,7 +7,7 @@ package routing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"foo/common/consts"
|
||||
"github.com/v2rayA/dae/common/consts"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/v2rayA/RoutingA-dist/go/routingA"
|
||||
"strconv"
|
||||
|
Loading…
Reference in New Issue
Block a user