- Add crypto library to OpenTTD
- Generate a single crypto-based unique identifier on clients
- On joining the server, the client gives the server his crypto-based unique identifier
- The server challenges the client to validate he is the owner of this crypto-based unique identifier
- On creating a new company, the server adds the unique identifier to the access list of the company
- On joining a company, before a password is asked, the server checks if you are on the access list of the company, and lets you in passwordless if you are
- The crypto-based unique identifiers who have access to companies are stored in the savegame
- Reloading a savegame on the same server keeps the access list intact
Use a public key (pubkey) / secret key (secret) to authenticate yourself with the server. At login, you authenticate yourself to the server. If you protect your company, this is done based on your pubkey. This means that only you with the correct secret can still join that company.
A server stores this pubkey in the savegame, to make company protections survive restarts.
import re | |
import sys | |
def replace_utf8(match): | |
char = match.group(0) | |
char = chr(int(char[2:4], 16)) + chr(int(char[6:8], 16)) | |
char = char.encode("raw_unicode_escape").decode() | |
char = char.encode("unicode_escape").decode() | |
char = char.replace("\\x", "\\u00") |
FROM emscripten/emsdk | |
COPY emsdk-liblzma.patch / | |
RUN cd /emsdk/upstream/emscripten && patch -p1 < /emsdk-liblzma.patch |
diff --git a/src/news_gui.cpp b/src/news_gui.cpp | |
index a3f73d729..055979951 100644 | |
--- a/src/news_gui.cpp | |
+++ b/src/news_gui.cpp | |
@@ -255,7 +255,7 @@ NewsDisplay NewsTypeData::GetDisplay() const | |
uint index; | |
const SettingDesc *sd = GetSettingFromName(this->name, &index); | |
assert(sd != nullptr); | |
- void *ptr = GetVariableAddress(nullptr, &sd->save); | |
+ void *ptr = GetVariableAddress(&_settings_game, &sd->save); |
'use strict'; | |
const querystring = require('querystring'); | |
exports.handler = (event, context, callback) => { | |
var request = event.Records[0].cf.request; | |
const params = querystring.parse(request.querystring); | |
var redirect_uri = '/index.php'; |
def func_00821b(): | |
if False: yield | |
lda8((Pointer((cpu.dh << 8), 0xff, 0x13)) if (cpu.flag_e and cpu.dl == 0) else (Pointer(0, 0xffff, cpu.d + 0x13))) | |
sta8(Pointer(0, 0xffffff, (cpu.dbr << 16) + ((0x2100) & 0xffff))) | |
lda8((Pointer((cpu.dh << 8), 0xff, 0x9b)) if (cpu.flag_e and cpu.dl == 0) else (Pointer(0, 0xffff, cpu.d + 0x9b))) | |
sta8(Pointer(0, 0xffffff, (cpu.dbr << 16) + ((0x420c) & 0xffff))) | |
rep(0b00110000) | |
plb8() | |
pld16() | |
ply16() |
For a while now, we have been talking how we get our OpenTTD binaries signed, and how we would get published on Steam. There are many aspects to this, and I am trying to put all that in a single place.
None of the current developers really has experience with this. So most of this information is collected from googling, asking on reddit, asking on twitter, etc. Please, if you have any experience with this and read here things that are wrong or could be done cheaper, let us know!
(some parts allow HTTP, instead of redirecting HTTP to HTTPS, because the OpenTTD client cannot use HTTPS) | |
HTTP+HTTPS binaries.openttd via ALB | |
/bananas -> forwarded ECS openttd/content-server | |
/installer -> redirect 301 installer.cdn.openttd.org | |
HTTPS binaries.openttd via ALB | |
/bananas -> 404 (files changed to md5-name) | |
/binaries -> redirect 301 cdn.openttd.org | |
/extra -> redirect 301 cdn.openttd.org |