outline-sdk icon indicating copy to clipboard operation
outline-sdk copied to clipboard

mobileproxy clib

Open daniellacosse opened this issue 10 months ago • 0 comments

Command to run:

cd outline-sdk
CGO_ENABLED=1 go build -buildmode=c-shared ./x/examples/mobileproxy-clib

Header file output:

#include <stdint.h>  // uintptr_t

typedef uintptr_t StreamDialer;
typedef uintptr_t Proxy;

extern StreamDialer NewStreamDialerFromConfig(char* config);
extern void ReleaseStreamDialer(StreamDialer dialerHandle);
extern Proxy RunProxy(char* address, StreamDialer dialerHandle);
extern void AddURLProxy(Proxy proxyHandle, char* url, StreamDialer dialerHandle);
extern void StopProxy(Proxy proxyHandle, unsigned int timeoutSeconds);
extern void ReleaseProxy(Proxy proxyHandle);

TODOs:

  • [ ] return tuple from main.go functions so we can have an error message
  • [ ] demo: implement error handling
  • [ ] demo: use signal to read Enter and shut down the server

daniellacosse avatar Apr 25 '24 21:04 daniellacosse