1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
* @file shoes.h
* @brief C interface for the shoes proxy library (auto-generated by cbindgen).
*
* Provides C-compatible functions for embedding the shoes VPN/proxy engine
* into iOS applications via Swift or Objective-C.
*/
/**
* Socket protector callback type.
* Called from Rust to protect sockets from VPN routing.
* The callback receives a file descriptor and should return true if protected successfully.
*/
typedef bool ;
/**
* Initialize the shoes library.
*
* # Arguments
* * `log_level` - Log level string: "error", "warn", "info", "debug", "trace"
*
* # Returns
* * 0 on success
* * -1 on error
*
* # Safety
* `log_level` must be a valid null-terminated C string.
*/
int ;
/**
* Start the shoes VPN service.
*
* # Arguments
* * `config_yaml` - YAML configuration string (must include device_fd in TUN config)
* * `protect_callback` - Callback function to protect sockets from VPN routing
*
* # Returns
* * Handle (> 0) on success
* * -1 on error
*
* # Safety
* `config_yaml` must be a valid null-terminated C string.
*/
long ;
/**
* Stop the shoes VPN service.
*
* # Arguments
* * `handle` - Handle returned by shoes_start (currently unused, we use global state)
*/
void ;
/**
* Check if the shoes service is running.
*
* # Returns
* * true if running
* * false if not running
*/
bool ;
/**
* Get the shoes library version.
*
* # Returns
* A static string containing the version. Do not free this pointer.
*/
const char *;
/**
* Set the log file path for file-based logging.
*
* # Arguments
* * `path` - Absolute path to the log file
*
* # Returns
* * 0 on success
* * -1 on error
*
* # Safety
* `path` must be a valid null-terminated C string.
*/
int ;
/* SHOES_H */