1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-29 07:10:25 +08:00

feat: impl. new protol design & new head

This commit is contained in:
源文雨
2025-03-12 22:20:02 +09:00
parent 60209117b7
commit f4fd9b1423
49 changed files with 1643 additions and 1137 deletions

View File

@@ -12,11 +12,10 @@ import (
"time"
curve "github.com/fumiama/go-x25519"
"github.com/fumiama/orbyte"
"github.com/sirupsen/logrus"
"github.com/fumiama/WireGold/gold/link"
"github.com/fumiama/WireGold/helper"
"github.com/fumiama/WireGold/internal/bin"
)
func TestTunnelUDP(t *testing.T) {
@@ -432,7 +431,7 @@ type logFormat struct {
func (f logFormat) Format(entry *logrus.Entry) ([]byte, error) {
// this writer will not be put back
buf := (*orbyte.Item[bytes.Buffer])(helper.SelectWriter()).Trans().Pointer()
buf := bin.SelectWriter()
buf.WriteByte('[')
if f.enableColor {
@@ -446,7 +445,7 @@ func (f logFormat) Format(entry *logrus.Entry) ([]byte, error) {
buf.WriteString(entry.Message)
buf.WriteString("\n")
return buf.Bytes(), nil
return buf.ToBytes().Trans(), nil
}
const (