retroproxy

package module
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

README

retroproxy

retroproxy is a reverse proxy for login and game servers of Dofus Retro.

Go Reference CI

Build

git clone https://github.com/kralamoure/retroproxy
cd retroproxy
go build ./cmd/retroproxy

Installation

Copy config.xml to the directory where Dofus Retro is installed (e.g. …/Ankama/Retro/resources/app/retroclient/config.xml), replacing the original one.

Usage

Printing usage help
docker run --rm ghcr.io/kralamoure/retroproxy:latest --help

Output:

Usage of retroproxy:
  -d, --debug           Enable debug mode
  -s, --server string   Dofus login server address (default "dofusretro-co-production.ankama-games.com:443")
  -l, --login string    Dofus login proxy listener address (default "0.0.0.0:5555")
  -g, --game string     Dofus game proxy listener address (default "0.0.0.0:5556")
  -p, --public string   Dofus game proxy public address (default "127.0.0.1:5556")
  -a, --admin           Force admin mode on the client
Starting the proxy
docker run --name retroproxy -p 5555-5556:5555-5556 -d ghcr.io/kralamoure/retroproxy:latest
Connecting to the proxy
  1. Go to Dofus Retro in the Ankama Launcher and press the Play button. Dofus Retro in Ankama Launcher
  2. After Dofus Retro has launched, select the With LauncherLocal configuration and press the OK button. Configuration screen of Dofus Retro

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteOldTicketsLoop

func DeleteOldTicketsLoop(ctx context.Context, r Storer, maxDur time.Duration)

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache is an implementation of Storer for an in-memory cache.

func NewCache

func NewCache(logger *zap.Logger) *Cache

func (*Cache) DeleteOldTickets

func (r *Cache) DeleteOldTickets(maxDur time.Duration)

func (*Cache) SetTicket

func (r *Cache) SetTicket(id string, t Ticket)

func (*Cache) UseTicket

func (r *Cache) UseTicket(id string) (Ticket, bool)

type Storer

type Storer interface {
	SetTicket(id string, t Ticket)
	UseTicket(id string) (Ticket, bool)
	DeleteOldTickets(maxDur time.Duration)
}

type Ticket

type Ticket struct {
	Host     string
	Port     string
	Original string

	IssuedAt time.Time
	ServerId int
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL