Rebrand from teeworlds to go-teeworlds-protocol

This commit is contained in:
ChillerDragon 2024-06-22 13:59:27 +08:00
parent 1cb97f07b4
commit 5e81eef4c7
28 changed files with 79 additions and 77 deletions

View file

@ -1,9 +1,7 @@
# teeworlds # go-teeworlds-protocol
A client side network protocol implementation of the game teeworlds. A client side network protocol implementation of the game teeworlds.
WORK IN PROGRESS
## run client ## run client
``` ```
@ -17,3 +15,7 @@ go build
go test ./... go test ./...
``` ```
## projects using go-teeworlds-protocol
- [MITM teeworlds proxy](https://github.com/teeworlds-go/proxy)

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/teeworlds-go/teeworlds module github.com/teeworlds-go/go-teeworlds-protocol
go 1.22.3 go 1.22.3

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type ClStartInfo struct { type ClStartInfo struct {

View file

@ -4,7 +4,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
func TestPackStartInfo(t *testing.T) { func TestPackStartInfo(t *testing.T) {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type ConReady struct { type ConReady struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type CtrlAccept struct { type CtrlAccept struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type CtrlClose struct { type CtrlClose struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type CtrlConnect struct { type CtrlConnect struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type CtrlKeepAlive struct { type CtrlKeepAlive struct {

View file

@ -6,9 +6,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type CtrlToken struct { type CtrlToken struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type EnterGame struct { type EnterGame struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type Info struct { type Info struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type InputTiming struct { type InputTiming struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type MapChange struct { type MapChange struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type NetMessage interface { type NetMessage interface {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type Ready struct { type Ready struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type ReadyToEnter struct { type ReadyToEnter struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type SnapEmpty struct { type SnapEmpty struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type SnapSingle struct { type SnapSingle struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type SvChat struct { type SvChat struct {

View file

@ -3,9 +3,9 @@ package messages7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type SvClientInfo struct { type SvClientInfo struct {

View file

@ -4,7 +4,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
func TestUnpackClientInfo(t *testing.T) { func TestUnpackClientInfo(t *testing.T) {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type SvMotd struct { type SvMotd struct {

View file

@ -1,9 +1,9 @@
package messages7 package messages7
import ( import (
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/packer" "github.com/teeworlds-go/go-teeworlds-protocol/packer"
) )
type Unknown struct { type Unknown struct {

View file

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/teeworlds-go/teeworlds/messages7" "github.com/teeworlds-go/go-teeworlds-protocol/messages7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
) )
type Player struct { type Player struct {

View file

@ -3,11 +3,11 @@ package protocol7
import ( import (
"slices" "slices"
"github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/go-teeworlds-protocol/messages7"
"github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/go-teeworlds-protocol/packer"
"github.com/teeworlds-go/huffman" "github.com/teeworlds-go/huffman"
"github.com/teeworlds-go/teeworlds/chunk7"
"github.com/teeworlds-go/teeworlds/messages7"
"github.com/teeworlds-go/teeworlds/network7"
"github.com/teeworlds-go/teeworlds/packer"
) )
const ( const (

View file

@ -5,8 +5,8 @@ import (
"slices" "slices"
"testing" "testing"
"github.com/teeworlds-go/teeworlds/chunk7" "github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/teeworlds/messages7" "github.com/teeworlds-go/go-teeworlds-protocol/messages7"
) )
// repack packet with unknown messages should not lose data // repack packet with unknown messages should not lose data

View file

@ -8,9 +8,9 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/teeworlds-go/teeworlds/messages7" "github.com/teeworlds-go/go-teeworlds-protocol/messages7"
"github.com/teeworlds-go/teeworlds/network7" "github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/teeworlds/protocol7" "github.com/teeworlds-go/go-teeworlds-protocol/protocol7"
) )
const ( const (