Comments (3)
I've drafted a sample implementation of a cache policy seen here: https://github.com/tsaibermelon/gg-struggle/blob/3fd846e0fedf556e2355fb0621841025dd49e9e3/server/local.json
It uses regexes to categorize the routes and the times are human-readable time strings.
from gg-struggle.
I was about to post about this too, maybe a cache policy according depending on the endpoints, it could be mapped on a constant layer on a json file, or something of that style.
const EXPIRE_TIME_TOWER_PROGRESSION = 1000 * 60 * 60 * 30 // Maybe 30 minutes is a right time
const EXPIRE_TIME_STATISTICS = 1000 * 60 * 60 * 60 * 24
const ENDPOINT_TO_CACHE_POLICY_MAPPING = {
"statistics": EXPIRE_TIME_STATISTICS,
"rank": EXPIRE_TIME_TOWER_PROGRESSION,
...
}
I do not know the exact endpoints of the GGST API, but maybe something like that would reduce the tower progression errors. Or maybe not even include caching for rank/tower progression, since it changes a lot.
Also, depending of the HTTP Method, it could discriminate the POST requests for the rank progressions, that should help something
from gg-struggle.
Does struggle get any of the data unencrypted by any chance?
Yup. The unencrypted responses and requests are dumped to their own file, named <key>.<gameReq|ggResp>.dump
, where the key is a hash of the url, method, and raw request payload. Their metadata is stored in a sqlite db named gg-struggle.db
. All this is found in %TEMP%
There are requests
and responses
tables in the db, and by joining them by the dumpKey
column, we get the whole transaction.
Sample query
SELECT
req.dumpkey as dumpKey,
req.url as url,
req.method as method,
req.headers as reqHeaders,
req.timeStart as reqTimeStart,
req.timeEnd as reqTimeEnd,
resp.statusCode as respStatusCode,
resp.headers as respHeaders,
resp.payloadSize as respPayloadSize,
resp.timeStart as respTimeStart,
resp.timeEnd as respTimeEnd
FROM requests AS req
LEFT JOIN responses AS resp USING (dumpKey)
So with this you can get the metadata from the db, and read the raw payloads in the dumps
directory.
from gg-struggle.
Related Issues (17)
- Error reading Request: No such file or directory HOT 6
- uninstall HOT 6
- Immediate crash when game attempts to connect HOT 2
- Can't import gg-struggle-cert.pem HOT 1
- "No such file or directory" and "Failed to upload R-Code" HOT 13
- Not Proxying Connection HOT 6
- v2.0.0 (pre-release) Error on connection HOT 5
- connect ENOBUFS - too many concurrent TCP connections HOT 7
- Add option to open ggst.exe on launch (enhancement) HOT 2
- It still takes a long time to load into the game HOT 20
- Running Strive without GG-Struggle seems to mess up the game and wont let it even connect to play online. HOT 1
- users not connecting to local server after install HOT 3
- Minimize to Systray HOT 3
- Game can not connect to the Internet, even with local server running HOT 3
- network issues HOT 2
- Can't play online anymore due to a bug after using gg-struggle for a day HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gg-struggle.