mirror of
https://github.com/qtgolang/SunnyNet.git
synced 2026-08-30 22:11:29 -07:00
1990 lines
72 KiB
C
1990 lines
72 KiB
C
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
||
|
||
/* package github.com/qtgolang/SunnyNet */
|
||
|
||
|
||
#line 1 "cgo-builtin-export-prolog"
|
||
|
||
#include <stddef.h>
|
||
|
||
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
||
#define GO_CGO_EXPORT_PROLOGUE_H
|
||
|
||
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
||
#endif
|
||
|
||
#endif
|
||
|
||
/* Start of preamble from import "C" comments. */
|
||
|
||
|
||
|
||
|
||
|
||
/* End of preamble from import "C" comments. */
|
||
|
||
|
||
/* Start of boilerplate cgo prologue. */
|
||
#line 1 "cgo-gcc-export-header-prolog"
|
||
|
||
#ifndef GO_CGO_PROLOGUE_H
|
||
#define GO_CGO_PROLOGUE_H
|
||
|
||
typedef signed char GoInt8;
|
||
typedef unsigned char GoUint8;
|
||
typedef short GoInt16;
|
||
typedef unsigned short GoUint16;
|
||
typedef int GoInt32;
|
||
typedef unsigned int GoUint32;
|
||
typedef long long GoInt64;
|
||
typedef unsigned long long GoUint64;
|
||
typedef GoInt32 GoInt;
|
||
typedef GoUint32 GoUint;
|
||
typedef size_t GoUintptr;
|
||
typedef float GoFloat32;
|
||
typedef double GoFloat64;
|
||
#ifdef _MSC_VER
|
||
#include <complex.h>
|
||
typedef _Fcomplex GoComplex64;
|
||
typedef _Dcomplex GoComplex128;
|
||
#else
|
||
typedef float _Complex GoComplex64;
|
||
typedef double _Complex GoComplex128;
|
||
#endif
|
||
|
||
/*
|
||
static assertion to make sure the file is being used on architecture
|
||
at least with matching size of GoInt.
|
||
*/
|
||
typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
|
||
|
||
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||
typedef _GoString_ GoString;
|
||
#endif
|
||
typedef void *GoMap;
|
||
typedef void *GoChan;
|
||
typedef struct { void *t; void *v; } GoInterface;
|
||
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
||
|
||
#endif
|
||
|
||
/* End of boilerplate cgo prologue. */
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetSunnyVersion 获取SunnyNet版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetSunnyVersion(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateSunnyNet 创建Sunny中间件对象,可创建多个
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateSunnyNet(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ReleaseSunnyNet 释放SunnyNet
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_ReleaseSunnyNet(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetStart 启动Sunny中间件 成功返回true
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetStart(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetSetPort 设置指定端口 Sunny中间件启动之前调用
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetSetPort(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoInt64 Port);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetClose 关闭停止指定Sunny中间件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetClose(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetSetCert 设置自定义证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetSetCert(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoInt64 CertificateManagerId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetInstallCert 安装证书 将证书安装到Windows系统内
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SunnyNetInstallCert(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetSetCallback 设置中间件回调地址 httpCallback
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetSetCallback(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Callback);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetSocket5AddUser 添加 S5代理需要验证的用户名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetSocket5AddUser(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr User, GoUintptr Pass);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetVerifyUser 开启身份验证模式
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetVerifyUser(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetSocket5DelUser 删除 S5需要验证的用户名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SunnyNetSocket5DelUser(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr User);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetGetSocket5User 开启身份验证模式后 获取授权的S5账号,注意UDP请求无法获取到授权的s5账号
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SunnyNetGetSocket5User(GoUintptr envObj, GoUintptr clazz, GoInt64 Theology);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetMustTcp 设置中间件是否开启强制走TCP
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SunnyNetMustTcp(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CompileProxyRegexp 设置中间件上游代理使用规则
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_CompileProxyRegexp(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Regexp);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetMustTcpRegexp 设置强制走TCP规则,如果 打开了全部强制走TCP状态,本功能则无效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetMustTcpRegexp(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Regexp, GoUint8 RulesAllow);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SunnyNetError 获取中间件启动时的错误信息
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SunnyNetError(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetGlobalProxy 设置全局上游代理 仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetGlobalProxy(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr ProxyAddress, GoInt64 outTime);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestProto 获取 HTTPS 请求的协议版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestProto(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseProto 获取 HTTPS 响应的协议版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseProto(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ExportCert 导出已设置的证书
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ExportCert(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetHTTPRequestMaxUpdateLength 设置HTTP请求,提交数据,最大的长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetHTTPRequestMaxUpdateLength(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoInt64 i);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CancelIEProxy 取消设置的IE代理
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_CancelIEProxy(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetIeProxy 设置IE代理
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetIeProxy(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestCookie 修改、设置 HTTP/S当前请求数据中指定Cookie
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetRequestCookie(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestAllCookie 修改、设置 HTTP/S当前请求数据中的全部Cookie
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetRequestAllCookie(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestCookie 获取 HTTP/S当前请求数据中指定的Cookie
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestCookie(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestALLCookie 获取 HTTP/S 当前请求全部Cookie
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestALLCookie(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DelResponseHeader 删除HTTP/S返回数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_DelResponseHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DelRequestHeader 删除HTTP/S请求数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_DelRequestHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestOutTime 请求设置超时-毫秒
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetRequestOutTime(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoInt64 times);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestALLHeader 设置HTTP/ S请求体中的全部协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetRequestALLHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestHeader 设置HTTP/S请求体中的协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetRequestHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RandomRequestCipherSuites 随机设置请求 CipherSuites
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RandomRequestCipherSuites(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestHTTP2Config 设置HTTP 2.0 请求指纹配置 (若服务器支持则使用,若服务器不支持,设置了也不会使用),如果强制请求发送时使用HTTP/1.1 请填入参数 http/1.1
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetRequestHTTP2Config(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr h2Config);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetResponseHeader 修改、设置 HTTP/S当前返回数据中的指定协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetResponseHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestHeader 获取 HTTP/S当前请求数据中的指定协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseHeader 获取 HTTP/S 当前返回数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseServerAddress 获取 HTTP/S 相应的服务器地址
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseServerAddress(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetResponseAllHeader 修改、设置 HTTP/S当前返回数据中的全部协议头,例如设置返回两条Cookie 使用本命令设置 使用设置、修改 单条命令无效
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetResponseAllHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr value);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseAllHeader 获取 HTTP/S 当前响应全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseAllHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestAllHeader 获取 HTTP/S 当前请求数据全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestAllHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestProxy 设置HTTP/S请求代理,仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetRequestProxy(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr ProxyUrl, GoInt outTime);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseStatusCode 获取HTTP/S返回的状态码
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_GetResponseStatusCode(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestClientIp 获取当前HTTP/S请求由哪个IP发起
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestClientIp(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseStatus 获取HTTP/S返回的状态文本 例如 [200 OK]
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseStatus(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetResponseStatus 修改HTTP/S返回的状态码
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetResponseStatus(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoInt64 code);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestUrl 修改HTTP/S当前请求的URL
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetRequestUrl(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr URI);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetResponseData 设置、修改 HTTP/S 当前请求返回数据 如果再发起请求时调用本命令,请求将不会被发送,将会直接返回 data=数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetResponseData(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRequestData 设置、修改 HTTP/S 当前请求POST提交数据 data=数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetRequestData(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetRequestBody 获取 HTTP/S 当前POST提交数据 返回 数据指针
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetRequestBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_IsRequestRawBody 此请求是否为原始body 如果是 将无法修改提交的Body,请使用 RawRequestDataToFile 命令来储存到文件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_IsRequestRawBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RawRequestDataToFile 获取 HTTP/ S 当前POST提交数据原始Data,传入保存文件名路径,例如"c:\1.txt"
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RawRequestDataToFile(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr saveFileName);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetResponseBody 获取 HTTP/S 当前返回数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetResponseBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CloseWebsocket 主动关闭Websocket
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_CloseWebsocket(GoUintptr envObj, GoUintptr clazz, GoInt64 Theology);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetWebsocketBody 获取 WebSocket消息
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetWebsocketBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetWebsocketBody 修改 WebSocket消息 data=数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetWebsocketBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SendWebsocketBody 主动向Websocket服务器发送消息 MessageType=WS消息类型 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SendWebsocketBody(GoUintptr envObj, GoUintptr clazz, GoInt64 Theology, GoInt64 MessageType, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SendWebsocketClientBody 主动向Websocket客户端发送消息 MessageType=WS消息类型 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SendWebsocketClientBody(GoUintptr envObj, GoUintptr clazz, GoInt64 Theology, GoInt64 MessageType, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetTcpBody 修改 TCP消息数据 MsgType=1 发送的消息 MsgType=2 接收的消息 如果 MsgType和MessageId不匹配,将不会执行操作 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetTcpBody(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoInt64 MsgType, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetTcpAgent 给当前TCP连接设置代理 仅限 TCP回调 即将连接时使用 仅支持S5代理 例如 socket5://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetTcpAgent(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr ProxyUrl, GoInt outTime);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_TcpCloseClient 根据唯一ID关闭指定的TCP连接 唯一ID在回调参数中
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_TcpCloseClient(GoUintptr envObj, GoUintptr clazz, GoInt64 theology);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetTcpConnectionIP 给指定的TCP连接 修改目标连接地址 目标地址必须带端口号 例如 baidu.com:443
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetTcpConnectionIP(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr address);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_TcpSendMsg 指定的TCP连接 模拟客户端向服务器端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_TcpSendMsg(GoUintptr envObj, GoUintptr clazz, GoInt64 theology, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_TcpSendMsgClient 指定的TCP连接 模拟服务器端向客户端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_TcpSendMsgClient(GoUintptr envObj, GoUintptr clazz, GoInt64 theology, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GzipUnCompress Gzip解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GzipUnCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_BrUnCompress br解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_BrUnCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_BrCompress br压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_BrCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ZSTDDecompress ZSTD解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ZSTDDecompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ZSTDCompress ZSTD压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ZSTDCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GzipCompress Gzip压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GzipCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ZlibCompress Zlib压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ZlibCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ZlibUnCompress Zlib解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ZlibUnCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DeflateUnCompress Deflate解压缩 (可能等同于zlib解压缩)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_DeflateUnCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DeflateCompress Deflate压缩 (可能等同于zlib压缩)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_DeflateCompress(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebpToJpegBytes Webp图片转JEG图片字节数组 SaveQuality=质量(默认75)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_WebpToJpegBytes(GoUintptr envObj, GoUintptr clazz, GoUintptr data, GoInt64 SaveQuality);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebpToPngBytes Webp图片转Png图片字节数组
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_WebpToPngBytes(GoUintptr envObj, GoUintptr clazz, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebpToJpeg Webp图片转JEG图片 根据文件名 SaveQuality=质量(默认75)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_WebpToJpeg(GoUintptr envObj, GoUintptr clazz, GoUintptr webpPath, GoUintptr savePath, GoInt64 SaveQuality);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebpToPng Webp图片转Png图片 根据文件名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_WebpToPng(GoUintptr envObj, GoUintptr clazz, GoUintptr webpPath, GoUintptr savePath);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_OpenDrive 开启进程代理/打开驱动
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_OpenDrive(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 isNf);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_UnDrive 卸载驱动,仅Windows 有效【需要管理权限】执行成功后会立即重启系统,若函数执行后没有重启系统表示没有管理员权限
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_UnDrive(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessAddName 进程代理 添加进程名
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessAddName(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessDelName 进程代理 删除进程名
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessDelName(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessAddPid 进程代理 添加PID
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessAddPid(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoInt64 pid);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessDelPid 进程代理 删除PID
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessDelPid(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoInt64 pid);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessCancelAll 进程代理 取消全部已设置的进程名
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessCancelAll(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ProcessALLName 进程代理 设置是否全部进程通过
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_ProcessALLName(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 open, GoUint8 StopNetwork);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetCommonName 证书管理器 获取证书 CommonName 字段
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetCommonName(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ExportP12 证书管理器 导出为P12
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_ExportP12(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr path, GoUintptr pass);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ExportPub 证书管理器 导出公钥
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ExportPub(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ExportKEY 证书管理器 导出私钥
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ExportKEY(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_ExportCA 证书管理器 导出证书
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_ExportCA(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateCA 证书管理器 创建证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_CreateCA(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr Country, GoUintptr Organization, GoUintptr OrganizationalUnit, GoUintptr Province, GoUintptr CommonName, GoUintptr Locality, GoInt64 bits, GoInt64 NotAfter);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_AddClientAuth 证书管理器 设置ClientAuth
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_AddClientAuth(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetCipherSuites 证书管理器 设置CipherSuites
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetCipherSuites(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_AddCertPoolText 证书管理器 设置信任的证书 从 文本
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_AddCertPoolText(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr cer);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_AddCertPoolPath 证书管理器 设置信任的证书 从 文件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_AddCertPoolPath(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr cer);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetServerName 证书管理器 取ServerName
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetServerName(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetServerName 证书管理器 设置ServerName
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetServerName(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetInsecureSkipVerify 证书管理器 设置跳过主机验证
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetInsecureSkipVerify(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUint8 b);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_LoadX509Certificate 证书管理器 载入X509证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_LoadX509Certificate(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr Host, GoUintptr CA, GoUintptr KEY);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_LoadX509KeyPair 证书管理器 载入X509证书2
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_LoadX509KeyPair(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr CaPath, GoUintptr KeyPath);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_LoadP12Certificate 证书管理器 载入p12证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_LoadP12Certificate(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr Name, GoUintptr Password);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RemoveCertificate 释放 证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RemoveCertificate(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateCertificate 创建 证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateCertificate(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetH2Config HTTP 客户端 设置HTTP2指纹
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetH2Config(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr config);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetRandomTLS HTTP 客户端 设置随机使用TLS指纹
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetRandomTLS(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUint8 RandomTLS);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetRedirect HTTP 客户端 设置重定向
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetRedirect(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUint8 Redirect);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetCode HTTP 客户端 返回响应状态码
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_HTTPGetCode(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetCertManager HTTP 客户端 设置证书管理器
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetCertManager(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 CertManagerContext);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetBody HTTP 客户端 返回响应内容
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_HTTPGetBody(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetRequestHeader HTTP 客户端 添加的全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_HTTPGetRequestHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetHeader HTTP 客户端 返回响应HTTPGetHeader
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_HTTPGetHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetHeads HTTP 客户端 返回响应全部Heads
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_HTTPGetHeads(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPGetBodyLen HTTP 客户端 返回响应长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_HTTPGetBodyLen(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSendBin HTTP 客户端 发送Body
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_HTTPSendBin(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr body);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetTimeouts HTTP 客户端 设置超时 毫秒
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_HTTPSetTimeouts(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 t1);
|
||
|
||
// Java_com_SunnyNet_api_HTTPSetServerIP
|
||
// HTTP 客户端 设置真实连接IP地址,
|
||
//
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_HTTPSetServerIP(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr ServerIP);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetProxyIP HTTP 客户端 设置代理IP 仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetProxyIP(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr ProxyUrl);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetHeader HTTP 客户端 设置协议头
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_HTTPSetHeader(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr name, GoUintptr value);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPOpen HTTP 客户端 Open
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_HTTPOpen(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr Method, GoUintptr URL);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RemoveHTTPClient 释放 HTTP客户端
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RemoveHTTPClient(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateHTTPClient 创建 HTTP 客户端
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateHTTPClient(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_JsonToPB JSON格式的protobuf数据转为protobuf二进制数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_JsonToPB(GoUintptr envObj, GoUintptr clazz, GoUintptr bin);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_PbToJson protobuf数据转为JSON格式
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_PbToJson(GoUintptr envObj, GoUintptr clazz, GoUintptr bin);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_QueuePull 队列弹出
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_QueuePull(GoUintptr envObj, GoUintptr clazz, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_QueuePush 加入队列
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_QueuePush(GoUintptr envObj, GoUintptr clazz, GoUintptr name, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_QueueLength 取队列长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_QueueLength(GoUintptr envObj, GoUintptr clazz, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_QueueRelease 清空销毁队列
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_QueueRelease(GoUintptr envObj, GoUintptr clazz, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_QueueIsEmpty 队列是否为空
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_QueueIsEmpty(GoUintptr envObj, GoUintptr clazz, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateQueue 创建队列
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_CreateQueue(GoUintptr envObj, GoUintptr clazz, GoUintptr name);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientWrite TCP客户端 发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SocketClientWrite(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 OutTimes, GoUintptr val);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientClose TCP客户端 断开连接
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SocketClientClose(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientReceive TCP客户端 同步模式下 接收数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SocketClientReceive(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 OutTimes);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientDial TCP客户端 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SocketClientDial(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr addr, GoUintptr call, GoUint8 isTls, GoUint8 synchronous, GoUintptr ProxyUrl, GoInt64 CertificateContext, GoInt64 OutTime, GoUintptr OutRouterIP);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientSetBufferSize TCP客户端 置缓冲区大小
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SocketClientSetBufferSize(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 BufferSize);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SocketClientGetErr TCP客户端 取错误
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SocketClientGetErr(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RemoveSocketClient 释放 TCP客户端
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RemoveSocketClient(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateSocketClient 创建 TCP客户端
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateSocketClient(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketClientReceive Websocket客户端 同步模式下 接收数据 返回数据指针 失败返回0 length=返回数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_WebsocketClientReceive(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 OutTimes);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketReadWrite Websocket客户端 发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_WebsocketReadWrite(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr val, GoInt64 messageType);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketClose Websocket客户端 断开
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_WebsocketClose(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketHeartbeat Websocket客户端 心跳设置
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_WebsocketHeartbeat(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoInt64 HeartbeatTime, GoUintptr call);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketDial Websocket客户端 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_WebsocketDial(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr URL, GoUintptr Heads, GoUintptr call, GoUint8 synchronous, GoUintptr ProxyUrl, GoInt64 CertificateConText, GoInt64 outTime, GoUintptr OutRouterIP);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_WebsocketGetErr Websocket客户端 获取错误
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_WebsocketGetErr(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RemoveWebsocket 释放 Websocket客户端 对象
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RemoveWebsocket(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateWebsocket 创建 Websocket客户端 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateWebsocket(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_AddHttpCertificate 创建 Http证书管理器 对象 实现指定Host使用指定证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_AddHttpCertificate(GoUintptr envObj, GoUintptr clazz, GoUintptr host, GoInt64 CertManagerId, GoInt64 Rules);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DelHttpCertificate 删除 Http证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_DelHttpCertificate(GoUintptr envObj, GoUintptr clazz, GoUintptr host);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisSubscribe Redis 订阅消息
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RedisSubscribe(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr scribe, GoUintptr call);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisDelete Redis 删除
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RedisDelete(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisFlushDB Redis 清空当前数据库
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RedisFlushDB(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisFlushAll Redis 清空redis服务器
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RedisFlushAll(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisClose Redis 关闭
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RedisClose(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisGetInt Redis 取整数值
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_RedisGetInt(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisGetKeys Redis 取指定条件键名
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_RedisGetKeys(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisDo Redis 自定义 执行和查询命令 返回操作结果可能是值 也可能是JSON文本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_RedisDo(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr args);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisGetStr Redis 取文本值
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_RedisGetStr(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisGetBytes Redis 取Bytes值
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_RedisGetBytes(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisExists Redis 检查指定 key 是否存在
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RedisExists(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisSetNx Redis 设置NX 【如果键名存在返回假】
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RedisSetNx(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key, GoUintptr val, GoInt expr);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisSet Redis 设置值
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RedisSet(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key, GoUintptr val, GoInt64 expr);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisSetBytes Redis 设置Bytes值
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RedisSetBytes(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr key, GoUintptr val, GoInt64 expr);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RedisDial Redis 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_RedisDial(GoUintptr envObj, GoUintptr clazz, GoInt64 Context, GoUintptr host, GoUintptr pass, GoInt64 db, GoInt64 PoolSize, GoInt64 MinIdleCons, GoInt64 DialTimeout, GoInt64 ReadTimeout, GoInt64 WriteTimeout, GoInt64 PoolTimeout, GoInt64 IdleCheckFrequency, GoInt64 IdleTimeout);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RemoveRedis 释放 Redis 对象
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_RemoveRedis(GoUintptr envObj, GoUintptr clazz, GoInt64 Context);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_CreateRedis 创建 Redis 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 Java_com_SunnyNet_api_CreateRedis(GoUintptr envObj, GoUintptr clazz);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetUdpData 设置修改UDP数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetUdpData(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_GetUdpData 获取UDP数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_GetUdpData(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_UdpSendToClient 指定的UDP连接 模拟服务器端向客户端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_UdpSendToClient(GoUintptr envObj, GoUintptr clazz, GoInt64 theology, GoUintptr data);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_UdpSendToServer 指定的UDP连接 模拟客户端向服务器端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_UdpSendToServer(GoUintptr envObj, GoUintptr clazz, GoInt64 theology, GoUintptr data);
|
||
|
||
// Java_com_SunnyNet_api_SetScriptCode 加载用户的脚本代码
|
||
//
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SetScriptCode(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr code);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetScriptPage 设置脚本编辑器页面 需不少于8个字符
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr Java_com_SunnyNet_api_SetScriptPage(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr Page);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DisableTCP 禁用TCP 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_DisableTCP(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 Disable);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_DisableUDP 禁用TCP 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_DisableUDP(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 Disable);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetRandomTLS 是否使用随机TLS指纹 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetRandomTLS(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetDnsServer Dns解析服务器 默认:223.5.5.5:853
|
||
*/
|
||
extern __declspec(dllexport) void Java_com_SunnyNet_api_SetDnsServer(GoUintptr envObj, GoUintptr clazz, GoUintptr ServerName);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_SetOutRouterIP 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(全局)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_SetOutRouterIP(GoUintptr envObj, GoUintptr clazz, GoInt64 SunnyContext, GoUintptr value);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_RequestSetOutRouterIP 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(TCP/HTTP请求共用这个函数)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_RequestSetOutRouterIP(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr value);
|
||
|
||
/*
|
||
Java_com_SunnyNet_api_HTTPSetOutRouterIP 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(TCP/HTTP请求共用这个函数)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 Java_com_SunnyNet_api_HTTPSetOutRouterIP(GoUintptr envObj, GoUintptr clazz, GoInt64 MessageId, GoUintptr value);
|
||
extern __declspec(dllexport) GoInt JNI_OnLoad(GoUintptr JavaVM, GoUintptr reserved);
|
||
|
||
/*
|
||
GetSunnyVersion 获取SunnyNet版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetSunnyVersion();
|
||
|
||
/*
|
||
Free 释放指针
|
||
*/
|
||
extern __declspec(dllexport) void Free(GoUintptr ptr);
|
||
|
||
/*
|
||
CreateSunnyNet 创建Sunny中间件对象,可创建多个
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateSunnyNet();
|
||
|
||
/*
|
||
ReleaseSunnyNet ReleaseSunnyNet 释放SunnyNet
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 ReleaseSunnyNet(GoInt SunnyContext);
|
||
|
||
/*
|
||
SunnyNetStart 启动Sunny中间件 成功返回true
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetStart(GoInt SunnyContext);
|
||
|
||
/*
|
||
SunnyNetSetPort 设置指定端口 Sunny中间件启动之前调用
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetSetPort(GoInt SunnyContext, GoInt Port);
|
||
|
||
/*
|
||
SunnyNetClose 关闭停止指定Sunny中间件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetClose(GoInt SunnyContext);
|
||
|
||
/*
|
||
SunnyNetSetCert 设置自定义证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetSetCert(GoInt SunnyContext, GoInt CertificateManagerId);
|
||
|
||
/*
|
||
SunnyNetInstallCert 安装证书 将证书安装到Windows系统内
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SunnyNetInstallCert(GoInt SunnyContext);
|
||
|
||
/*
|
||
SunnyNetSetCallback 设置中间件回调地址 httpCallback
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetSetCallback(GoInt SunnyContext, GoInt httpCallback, GoInt tcpCallback, GoInt wsCallback, GoInt udpCallback);
|
||
|
||
/*
|
||
SunnyNetSocket5AddUser 添加 S5代理需要验证的用户名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetSocket5AddUser(GoInt SunnyContext, char* User, char* Pass);
|
||
|
||
/*
|
||
SunnyNetVerifyUser 开启身份验证模式
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetVerifyUser(GoInt SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
SunnyNetSocket5DelUser 删除 S5需要验证的用户名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SunnyNetSocket5DelUser(GoInt SunnyContext, char* User);
|
||
|
||
/*
|
||
SunnyNetGetSocket5User 开启身份验证模式后 获取授权的S5账号,注意UDP请求无法获取到授权的s5账号
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SunnyNetGetSocket5User(GoInt Theology);
|
||
|
||
/*
|
||
SunnyNetMustTcp 设置中间件是否开启强制走TCP
|
||
*/
|
||
extern __declspec(dllexport) void SunnyNetMustTcp(GoInt SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
CompileProxyRegexp 设置中间件上游代理使用规则
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 CompileProxyRegexp(GoInt SunnyContext, char* Regexp);
|
||
|
||
/*
|
||
SetMustTcpRegexp 设置强制走TCP规则,如果 打开了全部强制走TCP状态,本功能则无效 RulesAllow=false 规则之外走TCP RulesAllow=true 规则之内走TCP
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetMustTcpRegexp(GoInt SunnyContext, char* Regexp, GoUint8 RulesAllow);
|
||
|
||
/*
|
||
SunnyNetError 获取中间件启动时的错误信息
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SunnyNetError(GoInt SunnyContext);
|
||
|
||
/*
|
||
SetGlobalProxy 设置全局上游代理 仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 SetGlobalProxy(GoInt SunnyContext, char* ProxyAddress, GoInt outTime);
|
||
|
||
/*
|
||
GetRequestProto 获取 HTTPS 请求的协议版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestProto(GoInt MessageId);
|
||
|
||
/*
|
||
GetResponseProto 获取 HTTPS 响应的协议版本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseProto(GoInt MessageId);
|
||
|
||
/*
|
||
ExportCert 导出已设置的证书
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ExportCert(GoInt SunnyContext);
|
||
|
||
/*
|
||
SetHTTPRequestMaxUpdateLength 设置HTTP请求,提交数据,最大的长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetHTTPRequestMaxUpdateLength(GoInt SunnyContext, GoInt64 i);
|
||
|
||
/*
|
||
SetIeProxy 设置IE代理 ,Windows 有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetIeProxy(GoInt SunnyContext);
|
||
|
||
/*
|
||
CancelIEProxy 取消设置的IE代理,Windows 有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 CancelIEProxy(GoInt SunnyContext);
|
||
|
||
/*
|
||
SetRequestCookie 修改、设置 HTTP/S当前请求数据中指定Cookie
|
||
*/
|
||
extern __declspec(dllexport) void SetRequestCookie(GoInt MessageId, char* name, char* val);
|
||
|
||
/*
|
||
SetRequestAllCookie 修改、设置 HTTP/S当前请求数据中的全部Cookie
|
||
*/
|
||
extern __declspec(dllexport) void SetRequestAllCookie(GoInt MessageId, char* val);
|
||
|
||
/*
|
||
GetRequestCookie 获取 HTTP/S当前请求数据中指定的Cookie
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestCookie(GoInt MessageId, char* name);
|
||
|
||
/*
|
||
GetRequestALLCookie 获取 HTTP/S 当前请求全部Cookie
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestALLCookie(GoInt MessageId);
|
||
|
||
/*
|
||
DelResponseHeader 删除HTTP/S返回数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) void DelResponseHeader(GoInt MessageId, char* name);
|
||
|
||
/*
|
||
DelRequestHeader 删除HTTP/S请求数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) void DelRequestHeader(GoInt MessageId, char* name);
|
||
|
||
/*
|
||
SetRequestOutTime 请求设置超时-毫秒
|
||
*/
|
||
extern __declspec(dllexport) void SetRequestOutTime(GoInt MessageId, GoInt times);
|
||
|
||
/*
|
||
SetRequestALLHeader SetRequestALLHeader 设置HTTP/ S请求体中的全部协议头
|
||
*/
|
||
extern __declspec(dllexport) void SetRequestALLHeader(GoInt MessageId, char* val);
|
||
|
||
/*
|
||
SetRequestHeader 设置HTTP/S请求体中的协议头
|
||
*/
|
||
extern __declspec(dllexport) void SetRequestHeader(GoInt MessageId, char* name, char* val);
|
||
|
||
/*
|
||
RandomRequestCipherSuites RandomRequestCipherSuites 随机设置请求 CipherSuites
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RandomRequestCipherSuites(GoInt MessageId);
|
||
|
||
/*
|
||
SetRequestHTTP2Config 设置HTTP 2.0 请求指纹配置 (若服务器支持则使用,若服务器不支持,设置了也不会使用)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetRequestHTTP2Config(GoInt MessageId, char* h2Config);
|
||
|
||
/*
|
||
SetResponseHeader 修改、设置 HTTP/S当前返回数据中的指定协议头
|
||
*/
|
||
extern __declspec(dllexport) void SetResponseHeader(GoInt MessageId, char* name, char* val);
|
||
|
||
/*
|
||
GetRequestHeader 获取 HTTP/S当前请求数据中的指定协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestHeader(GoInt MessageId, char* name);
|
||
|
||
/*
|
||
GetResponseHeader 获取 HTTP/S 当前返回数据中指定的协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseHeader(GoInt MessageId, char* name);
|
||
|
||
/*
|
||
GetResponseServerAddress 获取 HTTP/S 相应的服务器地址
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseServerAddress(GoInt MessageId);
|
||
|
||
/*
|
||
SetResponseAllHeader 修改、设置 HTTP/S当前返回数据中的全部协议头,例如设置返回两条Cookie 使用本命令设置 使用设置、修改 单条命令无效
|
||
*/
|
||
extern __declspec(dllexport) void SetResponseAllHeader(GoInt MessageId, char* value);
|
||
|
||
/*
|
||
GetResponseAllHeader 获取 HTTP/S 当前返回全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseAllHeader(GoInt MessageId);
|
||
|
||
/*
|
||
GetRequestAllHeader 获取 HTTP/S 当前请求数据全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestAllHeader(GoInt MessageId);
|
||
|
||
/*
|
||
SetRequestProxy 设置HTTP/S请求代理,仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 SetRequestProxy(GoInt MessageId, char* ProxyUrl, GoInt outTime);
|
||
|
||
/*
|
||
GetResponseStatusCode 获取HTTP/S返回的状态码
|
||
*/
|
||
extern __declspec(dllexport) GoInt GetResponseStatusCode(GoInt MessageId);
|
||
|
||
/*
|
||
GetRequestClientIp 获取当前HTTP/S请求由哪个IP发起
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestClientIp(GoInt MessageId);
|
||
|
||
/*
|
||
GetResponseStatus 获取HTTP/S返回的状态文本 例如 [200 OK]
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseStatus(GoInt MessageId);
|
||
|
||
/*
|
||
SetResponseStatus 修改HTTP/S返回的状态码
|
||
*/
|
||
extern __declspec(dllexport) void SetResponseStatus(GoInt MessageId, GoInt code);
|
||
|
||
/*
|
||
SetRequestUrl 修改HTTP/S当前请求的URL
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetRequestUrl(GoInt MessageId, char* URI);
|
||
|
||
/*
|
||
GetRequestBodyLen 获取 HTTP/S 当前请求POST提交数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt GetRequestBodyLen(GoInt MessageId);
|
||
|
||
/*
|
||
GetResponseBodyLen 获取 HTTP/S 当前返回 数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt GetResponseBodyLen(GoInt MessageId);
|
||
|
||
/*
|
||
SetResponseData 设置、修改 HTTP/S 当前请求返回数据 如果再发起请求时调用本命令,请求将不会被发送,将会直接返回 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetResponseData(GoInt MessageId, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
SetRequestData 设置、修改 HTTP/S 当前请求POST提交数据 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetRequestData(GoInt MessageId, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
GetRequestBody 获取 HTTP/S 当前POST提交数据 返回 数据指针
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetRequestBody(GoInt MessageId);
|
||
|
||
/*
|
||
IsRequestRawBody 此请求是否为原始body 如果是 将无法修改提交的Body,请使用 RawRequestDataToFile 命令来储存到文件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 IsRequestRawBody(GoInt MessageId);
|
||
|
||
/*
|
||
RawRequestDataToFile 获取 HTTP/ S 当前POST提交数据原始Data,传入保存文件名路径,例如"c:\1.txt"
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RawRequestDataToFile(GoInt MessageId, GoUintptr saveFileName, GoInt len);
|
||
|
||
/*
|
||
GetResponseBody 获取 HTTP/S 当前返回数据 返回 数据指针
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetResponseBody(GoInt MessageId);
|
||
|
||
/*
|
||
GetWebsocketBodyLen 获取 WebSocket消息长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt GetWebsocketBodyLen(GoInt MessageId);
|
||
|
||
/*
|
||
CloseWebsocket 主动关闭Websocket
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 CloseWebsocket(GoInt Theology);
|
||
|
||
/*
|
||
GetWebsocketBody 获取 WebSocket消息 返回数据指针
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetWebsocketBody(GoInt MessageId);
|
||
|
||
/*
|
||
SetWebsocketBody 修改 WebSocket消息 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetWebsocketBody(GoInt MessageId, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
SendWebsocketBody 主动向Websocket服务器发送消息 MessageType=WS消息类型 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SendWebsocketBody(GoInt Theology, GoInt MessageType, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
SendWebsocketClientBody SendWebsocketClientBody 主动向Websocket客户端发送消息 MessageType=WS消息类型 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SendWebsocketClientBody(GoInt Theology, GoInt MessageType, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
SetTcpBody 修改 TCP消息数据 MsgType=1 发送的消息 MsgType=2 接收的消息 如果 MsgType和MessageId不匹配,将不会执行操作 data=数据指针 dataLen=数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetTcpBody(GoInt MessageId, GoInt MsgType, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
SetTcpAgent 给当前TCP连接设置代理 仅限 TCP回调 即将连接时使用 仅支持S5代理 例如 socket5://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 SetTcpAgent(GoInt MessageId, char* ProxyUrl, GoInt outTime);
|
||
|
||
/*
|
||
TcpCloseClient 根据唯一ID关闭指定的TCP连接 唯一ID在回调参数中
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 TcpCloseClient(GoInt theology);
|
||
|
||
/*
|
||
SetTcpConnectionIP 给指定的TCP连接 修改目标连接地址 目标地址必须带端口号 例如 baidu.com:443
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetTcpConnectionIP(GoInt MessageId, char* address);
|
||
|
||
/*
|
||
TcpSendMsg 指定的TCP连接 模拟客户端向服务器端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoInt TcpSendMsg(GoInt theology, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
TcpSendMsgClient 指定的TCP连接 模拟服务器端向客户端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoInt TcpSendMsgClient(GoInt theology, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
BytesToInt 将Go int的Bytes 转为int
|
||
*/
|
||
extern __declspec(dllexport) GoInt BytesToInt(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
GzipUnCompress Gzip解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GzipUnCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
BrUnCompress br解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr BrUnCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
BrCompress br压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr BrCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
ZSTDDecompress ZSTD解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ZSTDDecompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
ZSTDCompress ZSTD压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ZSTDCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
BrCompress br压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr BrotliCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
GzipCompress Gzip压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GzipCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
ZlibCompress Zlib压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ZlibCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
ZlibUnCompress Zlib解压缩
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ZlibUnCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
DeflateUnCompress Deflate解压缩 (可能等同于zlib解压缩)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr DeflateUnCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
DeflateCompress Deflate压缩 (可能等同于zlib压缩)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr DeflateCompress(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
WebpToJpegBytes Webp图片转JEG图片字节数组 SaveQuality=质量(默认75)
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr WebpToJpegBytes(GoUintptr data, GoInt dataLen, GoInt SaveQuality);
|
||
|
||
/*
|
||
WebpToPngBytes Webp图片转Png图片字节数组
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr WebpToPngBytes(GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
WebpToJpeg Webp图片转JEG图片 根据文件名 SaveQuality=质量(默认75)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 WebpToJpeg(char* webpPath, char* savePath, GoInt SaveQuality);
|
||
|
||
/*
|
||
WebpToPng Webp图片转Png图片 根据文件名
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 WebpToPng(char* webpPath, char* savePath);
|
||
|
||
/*
|
||
OpenDrive 开始进程代理/打开驱动 只允许一个 SunnyNet 使用 [会自动安装所需驱动文件]
|
||
IsNfapi 如果为true表示使用NFAPI驱动 如果为false 表示使用Proxifier
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 OpenDrive(GoInt SunnyContext, GoUint8 isNf);
|
||
|
||
/*
|
||
UnDrive 卸载驱动,仅Windows 有效【需要管理权限】执行成功后会立即重启系统,若函数执行后没有重启系统表示没有管理员权限
|
||
*/
|
||
extern __declspec(dllexport) void UnDrive(GoInt SunnyContext);
|
||
|
||
/*
|
||
ProcessAddName 进程代理 添加进程名
|
||
*/
|
||
extern __declspec(dllexport) void ProcessAddName(GoInt SunnyContext, char* Name);
|
||
|
||
/*
|
||
ProcessDelName 进程代理 删除进程名
|
||
*/
|
||
extern __declspec(dllexport) void ProcessDelName(GoInt SunnyContext, char* Name);
|
||
|
||
/*
|
||
ProcessAddPid 进程代理 添加PID
|
||
*/
|
||
extern __declspec(dllexport) void ProcessAddPid(GoInt SunnyContext, GoInt pid);
|
||
|
||
/*
|
||
ProcessDelPid 进程代理 删除PID
|
||
*/
|
||
extern __declspec(dllexport) void ProcessDelPid(GoInt SunnyContext, GoInt pid);
|
||
|
||
/*
|
||
ProcessCancelAll 进程代理 取消全部已设置的进程名
|
||
*/
|
||
extern __declspec(dllexport) void ProcessCancelAll(GoInt SunnyContext);
|
||
|
||
/*
|
||
ProcessALLName 进程代理 设置是否全部进程通过
|
||
*/
|
||
extern __declspec(dllexport) void ProcessALLName(GoInt SunnyContext, GoUint8 open, GoUint8 StopNetwork);
|
||
|
||
/*
|
||
GetCommonName 证书管理器 获取证书 CommonName 字段
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetCommonName(GoInt Context);
|
||
|
||
/*
|
||
ExportP12 证书管理器 导出为P12
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 ExportP12(GoInt Context, char* path, char* pass);
|
||
|
||
/*
|
||
ExportPub 证书管理器 导出公钥
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ExportPub(GoInt Context);
|
||
|
||
/*
|
||
ExportKEY 证书管理器 导出私钥
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ExportKEY(GoInt Context);
|
||
|
||
/*
|
||
ExportCA 证书管理器 导出证书
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr ExportCA(GoInt Context);
|
||
|
||
/*
|
||
CreateCA 证书管理器 创建证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 CreateCA(GoInt Context, char* Country, char* Organization, char* OrganizationalUnit, char* Province, char* CommonName, char* Locality, GoInt bits, GoInt NotAfter);
|
||
|
||
/*
|
||
AddClientAuth 证书管理器 设置ClientAuth
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 AddClientAuth(GoInt Context, GoInt val);
|
||
|
||
/*
|
||
SetCipherSuites SetCipherSuites 证书管理器 设置CipherSuites
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetCipherSuites(GoInt Context, char* val);
|
||
|
||
/*
|
||
AddCertPoolText 证书管理器 设置信任的证书 从 文本
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 AddCertPoolText(GoInt Context, char* cer);
|
||
|
||
/*
|
||
AddCertPoolPath 证书管理器 设置信任的证书 从 文件
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 AddCertPoolPath(GoInt Context, char* cer);
|
||
|
||
/*
|
||
GetServerName 证书管理器 取ServerName
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetServerName(GoInt Context);
|
||
|
||
/*
|
||
SetServerName 证书管理器 设置ServerName
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetServerName(GoInt Context, char* name);
|
||
|
||
/*
|
||
SetInsecureSkipVerify 证书管理器 设置跳过主机验证
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetInsecureSkipVerify(GoInt Context, GoUint8 b);
|
||
|
||
/*
|
||
LoadX509Certificate 证书管理器 载入X509证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 LoadX509Certificate(GoInt Context, char* Host, char* CA, char* KEY);
|
||
|
||
/*
|
||
LoadX509KeyPair 证书管理器 载入X509证书2
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 LoadX509KeyPair(GoInt Context, char* CaPath, char* KeyPath);
|
||
|
||
/*
|
||
LoadP12Certificate 证书管理器 载入p12证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 LoadP12Certificate(GoInt Context, char* Name, char* Password);
|
||
|
||
/*
|
||
RemoveCertificate 释放 证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) void RemoveCertificate(GoInt Context);
|
||
|
||
/*
|
||
CreateCertificate 创建 证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateCertificate();
|
||
|
||
/*
|
||
KeysWriteStr GoMap 写字符串
|
||
*/
|
||
extern __declspec(dllexport) void KeysWriteStr(GoInt KeysHandle, char* name, GoUintptr val, GoInt len);
|
||
|
||
/*
|
||
KeysGetJson GoMap 转为JSON字符串
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr KeysGetJson(GoInt KeysHandle);
|
||
|
||
/*
|
||
KeysGetCount GoMap 取数量
|
||
*/
|
||
extern __declspec(dllexport) GoInt KeysGetCount(GoInt KeysHandle);
|
||
|
||
/*
|
||
KeysEmpty GoMap 清空
|
||
*/
|
||
extern __declspec(dllexport) void KeysEmpty(GoInt KeysHandle);
|
||
|
||
/*
|
||
KeysReadInt GoMap 读整数
|
||
*/
|
||
extern __declspec(dllexport) GoInt KeysReadInt(GoInt KeysHandle, char* name);
|
||
|
||
/*
|
||
KeysWriteInt GoMap 写整数
|
||
*/
|
||
extern __declspec(dllexport) void KeysWriteInt(GoInt KeysHandle, char* name, GoInt val);
|
||
|
||
/*
|
||
KeysReadLong GoMap 读长整数
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 KeysReadLong(GoInt KeysHandle, char* name);
|
||
|
||
/*
|
||
KeysWriteLong GoMap 写长整数
|
||
*/
|
||
extern __declspec(dllexport) void KeysWriteLong(GoInt KeysHandle, char* name, GoInt64 val);
|
||
|
||
/*
|
||
KeysReadFloat GoMap 读浮点数
|
||
*/
|
||
extern __declspec(dllexport) GoFloat64 KeysReadFloat(GoInt KeysHandle, char* name);
|
||
|
||
/*
|
||
KeysWriteFloat GoMap 写浮点数
|
||
*/
|
||
extern __declspec(dllexport) void KeysWriteFloat(GoInt KeysHandle, char* name, GoFloat64 val);
|
||
|
||
/*
|
||
KeysWrite GoMap 写字节数组
|
||
*/
|
||
extern __declspec(dllexport) void KeysWrite(GoInt KeysHandle, char* name, GoUintptr val, GoInt length);
|
||
|
||
/*
|
||
KeysRead GoMap 写读字符串/字节数组
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr KeysRead(GoInt KeysHandle, char* name);
|
||
|
||
/*
|
||
KeysDelete GoMap 删除
|
||
*/
|
||
extern __declspec(dllexport) void KeysDelete(GoInt KeysHandle, char* name);
|
||
|
||
/*
|
||
RemoveKeys GoMap 删除GoMap
|
||
*/
|
||
extern __declspec(dllexport) void RemoveKeys(GoInt KeysHandle);
|
||
|
||
/*
|
||
CreateKeys GoMap 创建
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateKeys();
|
||
|
||
/*
|
||
HTTPSetH2Config HTTP 客户端 设置HTTP2指纹
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 HTTPSetH2Config(GoInt Context, char* config);
|
||
|
||
/*
|
||
HTTPSetRandomTLS HTTP 客户端 设置随机使用TLS指纹
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 HTTPSetRandomTLS(GoInt Context, GoUint8 RandomTLS);
|
||
|
||
/*
|
||
HTTPSetRedirect HTTP 客户端 设置重定向
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 HTTPSetRedirect(GoInt Context, GoUint8 Redirect);
|
||
|
||
/*
|
||
HTTPGetCode HTTP 客户端 返回响应状态码
|
||
*/
|
||
extern __declspec(dllexport) GoInt HTTPGetCode(GoInt Context);
|
||
|
||
/*
|
||
HTTPSetCertManager HTTP 客户端 设置证书管理器
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 HTTPSetCertManager(GoInt Context, GoInt CertManagerContext);
|
||
|
||
/*
|
||
HTTPGetBody HTTP 客户端 返回响应内容
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr HTTPGetBody(GoInt Context);
|
||
|
||
/*
|
||
HTTPGetHeader HTTP 客户端 返回响应HTTPGetHeader
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr HTTPGetHeader(GoInt Context, char* name);
|
||
|
||
/*
|
||
HTTPGetRequestHeader HTTP 客户端 添加的全部协议头
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr HTTPGetRequestHeader(GoInt Context);
|
||
|
||
/*
|
||
HTTPGetHeads HTTP 客户端 返回响应全部Heads
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr HTTPGetHeads(GoInt Context);
|
||
|
||
/*
|
||
HTTPGetBodyLen HTTP 客户端 返回响应长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt HTTPGetBodyLen(GoInt Context);
|
||
|
||
/*
|
||
HTTPSendBin HTTP 客户端 发送Body
|
||
*/
|
||
extern __declspec(dllexport) void HTTPSendBin(GoInt Context, GoUintptr body, GoInt bodyLength);
|
||
|
||
/*
|
||
HTTPSetTimeouts HTTP 客户端 设置超时 毫秒
|
||
*/
|
||
extern __declspec(dllexport) void HTTPSetTimeouts(GoInt Context, GoInt t1);
|
||
|
||
// HTTPSetServerIP
|
||
// HTTP 客户端 设置真实连接IP地址,
|
||
//
|
||
extern __declspec(dllexport) void HTTPSetServerIP(GoInt Context, char* ServerIP);
|
||
|
||
/*
|
||
HTTPSetProxyIP HTTP 客户端 设置代理IP 仅支持Socket5和http 例如 socket5://admin:123456@127.0.0.1:8888 或 http://admin:123456@127.0.0.1:8888
|
||
*/
|
||
//
|
||
extern __declspec(dllexport) GoUint8 HTTPSetProxyIP(GoInt Context, char* ProxyUrl);
|
||
|
||
/*
|
||
HTTPSetHeader HTTP 客户端 设置协议头
|
||
*/
|
||
extern __declspec(dllexport) void HTTPSetHeader(GoInt Context, char* name, char* value);
|
||
|
||
/*
|
||
HTTPOpen HTTP 客户端 Open
|
||
*/
|
||
extern __declspec(dllexport) void HTTPOpen(GoInt Context, char* Method, char* URL);
|
||
|
||
/*
|
||
RemoveHTTPClient 释放 HTTP客户端
|
||
*/
|
||
extern __declspec(dllexport) void RemoveHTTPClient(GoInt Context);
|
||
|
||
/*
|
||
CreateHTTPClient 创建 HTTP 客户端
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateHTTPClient();
|
||
|
||
/*
|
||
JsonToPB JSON格式的protobuf数据转为protobuf二进制数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr JsonToPB(GoUintptr bin, GoInt binLen);
|
||
|
||
/*
|
||
PbToJson protobuf数据转为JSON格式
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr PbToJson(GoUintptr bin, GoInt binLen);
|
||
|
||
/*
|
||
QueuePull 队列弹出
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr QueuePull(char* name);
|
||
|
||
/*
|
||
QueuePush 加入队列
|
||
*/
|
||
extern __declspec(dllexport) void QueuePush(char* name, GoUintptr val, GoInt valLen);
|
||
|
||
/*
|
||
QueueLength 取队列长度
|
||
*/
|
||
extern __declspec(dllexport) GoInt QueueLength(char* name);
|
||
|
||
/*
|
||
QueueRelease 清空销毁队列
|
||
*/
|
||
extern __declspec(dllexport) void QueueRelease(char* name);
|
||
|
||
/*
|
||
QueueIsEmpty 队列是否为空
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 QueueIsEmpty(char* name);
|
||
|
||
/*
|
||
CreateQueue 创建队列
|
||
*/
|
||
extern __declspec(dllexport) void CreateQueue(char* name);
|
||
|
||
/*
|
||
SocketClientWrite TCP客户端 发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoInt SocketClientWrite(GoInt Context, GoInt OutTimes, GoUintptr val, GoInt valLen);
|
||
|
||
/*
|
||
SocketClientClose TCP客户端 断开连接
|
||
*/
|
||
extern __declspec(dllexport) void SocketClientClose(GoInt Context);
|
||
|
||
/*
|
||
SocketClientReceive TCP客户端 同步模式下 接收数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SocketClientReceive(GoInt Context, GoInt OutTimes);
|
||
|
||
/*
|
||
SocketClientDial TCP客户端 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SocketClientDial(GoInt Context, char* addr, GoInt call, GoUint8 isTls, GoUint8 synchronous, char* ProxyUrl, GoInt CertificateConText, GoInt OutTime, char* OutRouterIP);
|
||
|
||
/*
|
||
SocketClientSetBufferSize TCP客户端 置缓冲区大小
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SocketClientSetBufferSize(GoInt Context, GoInt BufferSize);
|
||
|
||
/*
|
||
SocketClientGetErr TCP客户端 取错误
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SocketClientGetErr(GoInt Context);
|
||
|
||
/*
|
||
RemoveSocketClient 释放 TCP客户端
|
||
*/
|
||
extern __declspec(dllexport) void RemoveSocketClient(GoInt Context);
|
||
|
||
/*
|
||
CreateSocketClient 创建 TCP客户端
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateSocketClient();
|
||
|
||
/*
|
||
WebsocketClientReceive Websocket客户端 同步模式下 接收数据 返回数据指针 失败返回0 length=返回数据长度
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr WebsocketClientReceive(GoInt Context, GoInt OutTimes);
|
||
|
||
/*
|
||
WebsocketReadWrite Websocket客户端 发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 WebsocketReadWrite(GoInt Context, GoUintptr val, GoInt valLen, GoInt messageType);
|
||
|
||
/*
|
||
WebsocketClose Websocket客户端 断开
|
||
*/
|
||
extern __declspec(dllexport) void WebsocketClose(GoInt Context);
|
||
|
||
/*
|
||
WebsocketHeartbeat Websocket客户端 心跳设置
|
||
*/
|
||
extern __declspec(dllexport) void WebsocketHeartbeat(GoInt Context, GoInt HeartbeatTime, GoInt call);
|
||
|
||
/*
|
||
WebsocketDial Websocket客户端 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 WebsocketDial(GoInt Context, char* URL, char* Heads, GoInt call, GoUint8 synchronous, char* ProxyUrl, GoInt CertificateConText, GoInt outTime, char* OutRouterIP);
|
||
|
||
/*
|
||
WebsocketGetErr Websocket客户端 获取错误
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr WebsocketGetErr(GoInt Context);
|
||
|
||
/*
|
||
RemoveWebsocket 释放 Websocket客户端 对象
|
||
*/
|
||
extern __declspec(dllexport) void RemoveWebsocket(GoInt Context);
|
||
|
||
/*
|
||
CreateWebsocket 创建 Websocket客户端 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateWebsocket();
|
||
|
||
/*
|
||
AddHttpCertificate 创建 Http证书管理器 对象 实现指定Host使用指定证书
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 AddHttpCertificate(char* host, GoInt CertManagerId, GoInt Rules);
|
||
|
||
/*
|
||
DelHttpCertificate 删除 Http证书管理器 对象
|
||
*/
|
||
extern __declspec(dllexport) void DelHttpCertificate(char* host);
|
||
|
||
/*
|
||
RedisSubscribe Redis 订阅消息
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisSubscribe(GoInt Context, char* scribe, GoInt call, GoUint8 nc);
|
||
|
||
/*
|
||
RedisDelete Redis 删除
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisDelete(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisFlushDB Redis 清空当前数据库
|
||
*/
|
||
extern __declspec(dllexport) void RedisFlushDB(GoInt Context);
|
||
|
||
/*
|
||
RedisFlushAll Redis 清空redis服务器
|
||
*/
|
||
extern __declspec(dllexport) void RedisFlushAll(GoInt Context);
|
||
|
||
/*
|
||
RedisClose Redis 关闭
|
||
*/
|
||
extern __declspec(dllexport) void RedisClose(GoInt Context);
|
||
|
||
/*
|
||
RedisGetInt Redis 取整数值
|
||
*/
|
||
extern __declspec(dllexport) GoInt64 RedisGetInt(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisGetKeys Redis 取指定条件键名
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr RedisGetKeys(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisDo Redis 自定义 执行和查询命令 返回操作结果可能是值 也可能是JSON文本
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr RedisDo(GoInt Context, char* args, GoUintptr error);
|
||
|
||
/*
|
||
RedisGetStr Redis 取文本值
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr RedisGetStr(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisGetBytes Redis 取Bytes值
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr RedisGetBytes(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisExists Redis 检查指定 key 是否存在
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisExists(GoInt Context, char* key);
|
||
|
||
/*
|
||
RedisSetNx Redis 设置NX 【如果键名存在返回假】
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisSetNx(GoInt Context, char* key, char* val, GoInt expr);
|
||
|
||
/*
|
||
RedisSet Redis 设置值
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisSet(GoInt Context, char* key, char* val, GoInt expr);
|
||
|
||
/*
|
||
RedisSetBytes Redis 设置Bytes值
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisSetBytes(GoInt Context, char* key, GoUintptr val, GoInt valLen, GoInt expr);
|
||
|
||
/*
|
||
RedisDial Redis 连接
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RedisDial(GoInt Context, char* host, char* pass, GoInt db, GoInt PoolSize, GoInt MinIdleCons, GoInt DialTimeout, GoInt ReadTimeout, GoInt WriteTimeout, GoInt PoolTimeout, GoInt IdleCheckFrequency, GoInt IdleTimeout, GoUintptr error);
|
||
|
||
/*
|
||
RemoveRedis 释放 Redis 对象
|
||
*/
|
||
extern __declspec(dllexport) void RemoveRedis(GoInt Context);
|
||
|
||
/*
|
||
CreateRedis 创建 Redis 对象
|
||
*/
|
||
extern __declspec(dllexport) GoInt CreateRedis();
|
||
|
||
/*
|
||
SetUdpData 设置修改UDP数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetUdpData(GoInt MessageId, GoUintptr val, GoInt valLen);
|
||
|
||
/*
|
||
GetUdpData 获取UDP数据
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr GetUdpData(GoInt MessageId);
|
||
|
||
/*
|
||
UdpSendToClient 指定的UDP连接 模拟服务器端向客户端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 UdpSendToClient(GoInt theology, GoUintptr data, GoInt dataLen);
|
||
|
||
/*
|
||
UdpSendToServer 指定的UDP连接 模拟客户端向服务器端主动发送数据
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 UdpSendToServer(GoInt theology, GoUintptr data, GoInt dataLen);
|
||
|
||
// SetScriptCode 加载用户的脚本代码
|
||
//
|
||
extern __declspec(dllexport) GoUintptr SetScriptCode(GoInt SunnyContext, GoUintptr code, GoInt length);
|
||
|
||
// SetScriptCall 设置脚本代码的回调函数
|
||
//
|
||
extern __declspec(dllexport) void SetScriptCall(GoInt SunnyContext, GoUintptr LOG, GoUintptr SAVE);
|
||
|
||
/*
|
||
SetScriptPage 设置脚本编辑器页面 需不少于8个字符
|
||
*/
|
||
extern __declspec(dllexport) GoUintptr SetScriptPage(GoInt SunnyContext, char* Page);
|
||
|
||
/*
|
||
DisableTCP 禁用TCP 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 DisableTCP(GoInt SunnyContext, GoUint8 Disable);
|
||
|
||
/*
|
||
DisableUDP 禁用TCP 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 DisableUDP(GoInt SunnyContext, GoUint8 Disable);
|
||
|
||
/*
|
||
SetRandomTLS 是否使用随机TLS指纹 仅对当前SunnyContext有效
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetRandomTLS(GoInt SunnyContext, GoUint8 open);
|
||
|
||
/*
|
||
SetDnsServer Dns解析服务器 默认:223.5.5.5:853
|
||
*/
|
||
extern __declspec(dllexport) void SetDnsServer(char* ServerName);
|
||
|
||
/*
|
||
SetOutRouterIP 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(全局)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 SetOutRouterIP(GoInt SunnyContext, char* value);
|
||
|
||
/*
|
||
RequestSetOutRouterIP 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(TCP/HTTP请求共用这个函数)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 RequestSetOutRouterIP(GoInt MessageId, char* value);
|
||
|
||
/*
|
||
HTTPSetOutRouterIP
|
||
HTTP 客户端 设置数据出口IP 请传入网卡对应的IP地址,用于指定网卡,例如 192.168.31.11(TCP/HTTP请求共用这个函数)
|
||
*/
|
||
extern __declspec(dllexport) GoUint8 HTTPSetOutRouterIP(GoInt Context, char* value);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|