Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package app

import (
"github.com/gorilla/mux"
"github.com/restartfu/decryptmypack/app/template"
"net/http"
"strings"

"github.com/gorilla/mux"
"github.com/restartfu/decryptmypack/app/template"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion app/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package app
import (
"archive/zip"
"fmt"
"github.com/restartfu/decryptmypack/app/minecraft"
"net"
"net/http"
"os"
"strconv"
"strings"
"sync"
"time"

"github.com/restartfu/decryptmypack/app/minecraft"
)

var (
Expand Down
10 changes: 7 additions & 3 deletions app/minecraft/minecraft.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package minecraft

import (
"log/slog"
"math/rand"
"time"

"github.com/google/uuid"
"github.com/sandertv/gophertunnel/minecraft"
"github.com/sandertv/gophertunnel/minecraft/protocol"
"github.com/sandertv/gophertunnel/minecraft/protocol/login"
"github.com/sandertv/gophertunnel/minecraft/protocol/packet"
"math/rand"
"time"
)

var proxies []proxyInfo
Expand All @@ -19,7 +21,9 @@ func init() {
func Connect(target string) (*minecraft.Conn, error) {
if len(proxies) > 0 {
// Override the default RakNet network with our anonymous RakNet network.
minecraft.RegisterNetwork("raknet", NewAnonymousRakNet(proxies))
minecraft.RegisterNetwork("raknet", func(*slog.Logger) minecraft.Network {
return NewAnonymousRakNet(proxies)
})
}

serverConn, err := minecraft.Dialer{
Expand Down
3 changes: 2 additions & 1 deletion app/minecraft/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"crypto/aes"
"encoding/json"
"fmt"
"github.com/sandertv/gophertunnel/minecraft/resource"
"io"
"os"
"strings"

"github.com/sandertv/gophertunnel/minecraft/resource"
)

func EncodePack(pack *resource.Pack) ([]byte, error) {
Expand Down
3 changes: 2 additions & 1 deletion app/minecraft/proxies.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package minecraft
import (
"bufio"
"fmt"
"github.com/txthinking/socks5"
"math/rand"
"os"
"strings"

"github.com/txthinking/socks5"
)

// proxyInfo ...
Expand Down
3 changes: 2 additions & 1 deletion app/minecraft/raknet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package minecraft
import (
"context"
"fmt"
"github.com/sandertv/gophertunnel/minecraft"
"net"

"github.com/sandertv/gophertunnel/minecraft"
)

// AnonymousRakNet ...
Expand Down
5 changes: 3 additions & 2 deletions app/minecraft/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package minecraft

import (
"encoding/json"
"github.com/sandertv/gophertunnel/minecraft/auth"
"golang.org/x/oauth2"
"os"
"os/signal"
"syscall"

"github.com/sandertv/gophertunnel/minecraft/auth"
"golang.org/x/oauth2"
)

var src oauth2.TokenSource
Expand Down
48 changes: 20 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
module github.com/restartfu/decryptmypack

go 1.22

toolchain go1.22.2
go 1.25.0

require (
github.com/df-mc/dragonfly v0.9.15
github.com/df-mc/dragonfly v0.10.10-0.20251212030421-d49e4d4ed00c
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/sandertv/gophertunnel v1.38.1-0.20240616191646-0124e15a718b
github.com/sirupsen/logrus v1.9.3
github.com/txthinking/socks5 v0.0.0-20230325130024-4230056ae301
golang.org/x/oauth2 v0.21.0
github.com/sandertv/gophertunnel v1.51.1
github.com/txthinking/socks5 v0.0.0-20251011041537-5c31f201a10e
golang.org/x/oauth2 v0.34.0
)

require (
github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/df-mc/atomic v1.10.0 // indirect
github.com/brentp/intintmap v0.0.0-20251106190759-56907b1f8479 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/df-mc/goleveldb v1.1.9 // indirect
github.com/df-mc/worldupgrader v1.0.13 // indirect
github.com/go-gl/mathgl v1.1.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/muhammadmuzzammil1998/jsonc v1.0.0 // indirect
github.com/df-mc/jsonc v1.0.5 // indirect
github.com/df-mc/worldupgrader v1.0.20 // indirect
github.com/go-gl/mathgl v1.2.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/klauspost/compress v1.18.2 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/povsister/scp v0.0.0-20210427074412-33febfd9f13e // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/sandertv/go-raknet v1.14.1 // indirect
github.com/sandertv/go-raknet v1.14.3-0.20250823121252-325aeea25d25 // indirect
github.com/segmentio/fasthash v1.0.3 // indirect
github.com/txthinking/runnergroup v0.0.0-20210608031112-152c7c4432bf // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect
golang.org/x/image v0.17.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
github.com/txthinking/runnergroup v0.0.0-20250224021307-5864ffeb65ae // indirect
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
golang.org/x/mod v0.31.0 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/text v0.32.0 // indirect
)
Loading