Rebrand from teeworlds to go-teeworlds-protocol
This commit is contained in:
parent
1cb97f07b4
commit
5e81eef4c7
|
@ -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
2
go.mod
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
Loading…
Reference in a new issue