mirror of
https://github.com/SirHumza/orbisRPC.git
synced 2026-10-29 04:02:45 +01:00
Full daemon source (C, PS4 native): - log/cfg/jsonlite/b64: logging, /data/PS4RP/config.json, JSON, base64 - http.c: OAuth2 token exchange via SceHttp (authorization_code + refresh) - ws.c: WebSocket over SceNet + LibreSSL (SSLv23_client_method), DNS via sceNetResolverStartNtoa, OrbisNetSockaddr packing - discord.c: gateway connect/identify/heartbeat/presence set+clear - detect.c: foreground game via sceUserServiceGetForegroundUser + app.xml/app.db title-name resolution - main.c: poll loop (config poll_interval_s) Build verified on macOS (LLVM 21 + OpenOrbis toolchain v0.5.4): - 9 objects compile, lld 21 links build/ps4rp.elf (169KB) - create-fself produces valid SCE ASLR payload build/ps4rp.fself - libSceLibreSSL exports the OpenSSL-style TLS API used by ws.c
14 lines
601 B
C
14 lines
601 B
C
/* http.h - OAuth token exchange via SceHttp */
|
|
#ifndef HTTP_H
|
|
#define HTTP_H
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
/* POST to token endpoint; fills access_token/refresh_token/expires_in. Returns 0 ok. */
|
|
int http_oauth_token(const char *client_id, const char *client_secret,
|
|
const char *code, const char *refresh_token,
|
|
char *access_token, size_t at_cap,
|
|
char *refresh_out, size_t rt_cap,
|
|
int64_t *expires_out_epoch);
|
|
/* simple GET into caller buffer */
|
|
int http_get(const char *url, char *out, size_t cap);
|
|
#endif |