An open API service indexing awesome lists of open source software.

https://github.com/rosemound/soup-hub

A simple, small hub for sharing game servers over the network
https://github.com/rosemound/soup-hub

cs2 csgo css go soup souph souphub valve-games

Last synced: 14 days ago
JSON representation

A simple, small hub for sharing game servers over the network

Awesome Lists containing this project

README

          


SoupHub


A simple, small hub for sharing game servers over the network

### About
A simple, small hub for sharing your project's game servers over the network.
Allows you to connect your project's game servers to master hubs and share them with others

This is part of the `soup` system that will be released very soon.

### Configuration
Confifure `souph.json` for yourself (remove all comments):
```json5
{
// your hub name
"name": "Rosenound CS2 Project Hub",

// your hub http port
"port": "50001",

// your hub description
"description": "This is very small description",

// just env: dev or prod
"environment": "prod",

// access token to your hub API (don't show it to anyone ;)
"accessToken": "asdasdasdasdasdasdasdas123asdasd",

// your company / project (optional)
"company": {
"name": "Rosemound.ru",
"url": "https://rosemound.ru"
},

// servers that u want to share
// (ip:port will be visible only for you and master hub)
// users will only see the name
// so you don't risk losing your audience when changing the address
"servers": {
"127.0.0.1:3333": {
// unique name
"name": "hi",
"category": "test"
}
}
}
```

### Endpoints

#### `POST`

Request is sent from the `master hub` to `your hub`: \
`https:///souph/share?access_token=>`\
```json5
// Request raw body
{
"masters": {
"": {

// Master hub name
"name": "Rosemound Master Hub",

// Master hub host
"host": "hub.rosemound.ru",

// Sharing servers
"servers": [
"173.12.31.144:53111",
"173.12.31.145:53331"
]
}
}
}
```

#### `GET`
Request is sent from the `master hub` to `your hub` (periodic): \
`https:///souph/share?access_token=>`\
```json5
// Request raw body
{
"master_token": ""
}
```
```json5
// Response (example)
{
"name": "Rosemound CS2 Project Hub",

"company": {
"name": "Rosemound",
"url": "https://rosemound.ru"
},

"servers": {
"173.12.31.144:53111": {
"name": "pub",
"category": "test"
},

"173.12.31.145:53331": {
"name": "surf",
"category": "test"
}
}
}

```

#### `GET`
Get registered active masters: \
`https:///souph/masters?access_token=>`\

```json5
// Response (example)
{
"masters": [
{
// Hub name
"name": "Rosemound Master Hub",

// Hub host
"host": "hub.rosemound.ru",

// Hub registration exp time
"expiration": 1758536958,

// Requested by master hub servers
"servers": [
"173.12.31.144:53111"
]
}
]
}
```