]> git.sesse.net Git - ultimatescore/blob - pubsub/README
Add a comment about what “Mark game” means.
[ultimatescore] / pubsub / README
1 UDP-to-PubSub bridge to traverse NATs by only using outgoing TCP.
2
3 bodet.js and ultimatescore.js acts as emulators for respectively the bodet
4 client and ultimatescore. The former listens for UDP messages on port 6000, and
5 forwards any messages to a Google PubSub topic. The latter uses longpolling
6 (with reconnect) to retrieve messages from a subscription on the topic, and
7 sends the payload as UDP. The destination port is sent as a pubsub message
8 attribute, so the bodet.js client implicitly chooses the port.
9
10 Both programs require gcloud credentials available in environment: Either by
11 having set the environment variable GOOGLE_APPLICATION_CREDENTIALS to a JSON
12 file with ServiceAccount credentials, or by using a personal account logged in
13 with gcloud auth login. Using a ServiceAccount is recommended.
14
15 To download a ServiceAccount credential file, go to
16 https://console.cloud.google.com/iam-admin/serviceaccounts?project=plastkast
17 and click the dot-menu for ultimatescore@plastkast.iam.gserviceaccount.com,
18 choose Create Key and follow instructions. The account already has the
19 necessary privileges.