{
  "name": "scorpiox-frp",
  "version": "0.68.1",
  "description": "Pure C frp client engine (frpc protocol v0.67+, yamux multiplexing, token auth) as a Windows/Linux DLL for P/Invoke. Used by the Personal Tunnel WinUI3 Store app.",
  "exports": [
    {
      "name": "frp_version",
      "return": "const char*",
      "csharp_return": "string (IntPtr + PtrToStringAnsi)",
      "args": [],
      "notes": "Returns \"0.68.1\""
    },
    {
      "name": "frp_last_error",
      "return": "const char*",
      "csharp_return": "string (IntPtr + PtrToStringAnsi)",
      "args": [],
      "notes": "\"\" if none. Internal buffer \u2014 copy immediately."
    },
    {
      "name": "frp_start",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {
          "name": "config_json",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        }
      ],
      "notes": "0 ok, -1 error (see frp_last_error). BLOCKS until login + proxy registered \u2014 call from a worker thread. Single-proxy config: {server_addr, server_port, token, proxy_name, proxy_type, local_ip, local_port, remote_port}. Multi-proxy: {server_addr, server_port, token, proxies: [{name, local_port, remote_port}, ...]} (max 8). Re-start after stop supported."
    },
    {
      "name": "frp_stop",
      "return": "int",
      "csharp_return": "int",
      "args": [],
      "notes": "Blocking \u2014 joins worker threads, bounded 10s per tunnel (Linux timed join / Windows WaitForSingleObject 10000). Idempotent, returns 0."
    },
    {
      "name": "frp_status",
      "return": "int",
      "csharp_return": "int",
      "args": [],
      "notes": "1 = at least one tunnel running, 0 = stopped"
    },
    {
      "name": "frp_get_config",
      "return": "const char*",
      "csharp_return": "string (IntPtr + PtrToStringAnsi)",
      "args": [],
      "notes": "Applied config JSON, token redacted (token_set bool). Internal buffer \u2014 copy immediately."
    },
    {
      "name": "frp_runtime_status",
      "return": "const char*",
      "csharp_return": "string (IntPtr + PtrToStringAnsi)",
      "args": [],
      "notes": "Live JSON: {running, connected, last_error, proxies:[{name, connected, local_port, remote_port, reconnects, error}]}. Poll ~every 3s. Internal buffer \u2014 copy immediately."
    }
  ],
  "changelog_0_68_1": "Windows fd_set regression fix: SOCKET handle VALUE was compared against FD_SETSIZE (64) and every work conn was dropped / local socket never watched on Windows. Winsock fd_set stores handles in an array (fd_count + fd_array[]), so only the ENTRY COUNT matters. v0.67 worked; 0.68 broke Windows relaying; 0.68.1 restores it (verified .206 -> frps .90:6050, HTTP 200 + body through the tunnel)."
}