appium-ios-tuntap 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ # This file is generated by gyp; do not edit.
2
+
3
+ export builddir_name ?= ./build/node_modules/node-addon-api/.
4
+ .PHONY: all
5
+ all:
6
+ $(MAKE) -C ../.. nothing
@@ -0,0 +1,185 @@
1
+ # This file is generated by gyp; do not edit.
2
+
3
+ TOOLSET := target
4
+ TARGET := nothing
5
+ DEFS_Debug := \
6
+ '-DNODE_GYP_MODULE_NAME=nothing' \
7
+ '-DUSING_UV_SHARED=1' \
8
+ '-DUSING_V8_SHARED=1' \
9
+ '-DV8_DEPRECATION_WARNINGS=1' \
10
+ '-D_GLIBCXX_USE_CXX11_ABI=1' \
11
+ '-D_DARWIN_USE_64_BIT_INODE=1' \
12
+ '-D_LARGEFILE_SOURCE' \
13
+ '-D_FILE_OFFSET_BITS=64' \
14
+ '-DOPENSSL_NO_PINSHARED' \
15
+ '-DOPENSSL_THREADS' \
16
+ '-DDEBUG' \
17
+ '-D_DEBUG'
18
+
19
+ # Flags passed to all source files.
20
+ CFLAGS_Debug := \
21
+ -O0 \
22
+ -gdwarf-2 \
23
+ -mmacosx-version-min=10.15 \
24
+ -arch \
25
+ arm64 \
26
+ -Wall \
27
+ -Wendif-labels \
28
+ -W \
29
+ -Wno-unused-parameter
30
+
31
+ # Flags passed to only C files.
32
+ CFLAGS_C_Debug := \
33
+ -fno-strict-aliasing
34
+
35
+ # Flags passed to only C++ files.
36
+ CFLAGS_CC_Debug := \
37
+ -std=gnu++17 \
38
+ -stdlib=libc++ \
39
+ -fno-rtti \
40
+ -fno-exceptions \
41
+ -fno-strict-aliasing
42
+
43
+ # Flags passed to only ObjC files.
44
+ CFLAGS_OBJC_Debug :=
45
+
46
+ # Flags passed to only ObjC++ files.
47
+ CFLAGS_OBJCC_Debug :=
48
+
49
+ INCS_Debug := \
50
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/include/node \
51
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/src \
52
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/config \
53
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/openssl/include \
54
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/uv/include \
55
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/zlib \
56
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/v8/include
57
+
58
+ DEFS_Release := \
59
+ '-DNODE_GYP_MODULE_NAME=nothing' \
60
+ '-DUSING_UV_SHARED=1' \
61
+ '-DUSING_V8_SHARED=1' \
62
+ '-DV8_DEPRECATION_WARNINGS=1' \
63
+ '-D_GLIBCXX_USE_CXX11_ABI=1' \
64
+ '-D_DARWIN_USE_64_BIT_INODE=1' \
65
+ '-D_LARGEFILE_SOURCE' \
66
+ '-D_FILE_OFFSET_BITS=64' \
67
+ '-DOPENSSL_NO_PINSHARED' \
68
+ '-DOPENSSL_THREADS'
69
+
70
+ # Flags passed to all source files.
71
+ CFLAGS_Release := \
72
+ -O3 \
73
+ -gdwarf-2 \
74
+ -mmacosx-version-min=10.15 \
75
+ -arch \
76
+ arm64 \
77
+ -Wall \
78
+ -Wendif-labels \
79
+ -W \
80
+ -Wno-unused-parameter
81
+
82
+ # Flags passed to only C files.
83
+ CFLAGS_C_Release := \
84
+ -fno-strict-aliasing
85
+
86
+ # Flags passed to only C++ files.
87
+ CFLAGS_CC_Release := \
88
+ -std=gnu++17 \
89
+ -stdlib=libc++ \
90
+ -fno-rtti \
91
+ -fno-exceptions \
92
+ -fno-strict-aliasing
93
+
94
+ # Flags passed to only ObjC files.
95
+ CFLAGS_OBJC_Release :=
96
+
97
+ # Flags passed to only ObjC++ files.
98
+ CFLAGS_OBJCC_Release :=
99
+
100
+ INCS_Release := \
101
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/include/node \
102
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/src \
103
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/config \
104
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/openssl/include \
105
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/uv/include \
106
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/zlib \
107
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/v8/include
108
+
109
+ OBJS := \
110
+ $(obj).target/$(TARGET)/node_modules/node-addon-api/nothing.o
111
+
112
+ # Add to the list of files we specially track dependencies for.
113
+ all_deps += $(OBJS)
114
+
115
+ # CFLAGS et al overrides must be target-local.
116
+ # See "Target-specific Variable Values" in the GNU Make manual.
117
+ $(OBJS): TOOLSET := $(TOOLSET)
118
+ $(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
119
+ $(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
120
+ $(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
121
+ $(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
122
+
123
+ # Suffix rules, putting all outputs into $(obj).
124
+
125
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
126
+ @$(call do_cmd,cc,1)
127
+
128
+ # Try building from generated source, too.
129
+
130
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
131
+ @$(call do_cmd,cc,1)
132
+
133
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
134
+ @$(call do_cmd,cc,1)
135
+
136
+ # End of this set of suffix rules
137
+ ### Rules for final target.
138
+ LDFLAGS_Debug := \
139
+ -mmacosx-version-min=10.15 \
140
+ -arch \
141
+ arm64 \
142
+ -L$(builddir) \
143
+ -stdlib=libc++
144
+
145
+ LIBTOOLFLAGS_Debug :=
146
+
147
+ LDFLAGS_Release := \
148
+ -mmacosx-version-min=10.15 \
149
+ -arch \
150
+ arm64 \
151
+ -L$(builddir) \
152
+ -stdlib=libc++
153
+
154
+ LIBTOOLFLAGS_Release :=
155
+
156
+ LIBS :=
157
+
158
+ $(builddir)/nothing.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
159
+ $(builddir)/nothing.a: LIBS := $(LIBS)
160
+ $(builddir)/nothing.a: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
161
+ $(builddir)/nothing.a: TOOLSET := $(TOOLSET)
162
+ $(builddir)/nothing.a: $(OBJS) FORCE_DO_CMD
163
+ $(call do_cmd,alink)
164
+
165
+ all_deps += $(builddir)/nothing.a
166
+ # Add target alias
167
+ .PHONY: nothing
168
+ nothing: $(builddir)/nothing.a
169
+
170
+ # Add target alias to "all" target.
171
+ .PHONY: all
172
+ all: nothing
173
+
174
+ # Add target alias
175
+ .PHONY: nothing
176
+ nothing: $(builddir)/nothing.a
177
+
178
+ # Short alias for building this static library.
179
+ .PHONY: nothing.a
180
+ nothing.a: $(builddir)/nothing.a
181
+
182
+ # Add static library to "all" target.
183
+ .PHONY: all
184
+ all: $(builddir)/nothing.a
185
+
@@ -0,0 +1,222 @@
1
+ # This file is generated by gyp; do not edit.
2
+
3
+ TOOLSET := target
4
+ TARGET := tuntap
5
+ DEFS_Debug := \
6
+ '-DNODE_GYP_MODULE_NAME=tuntap' \
7
+ '-DUSING_UV_SHARED=1' \
8
+ '-DUSING_V8_SHARED=1' \
9
+ '-DV8_DEPRECATION_WARNINGS=1' \
10
+ '-D_GLIBCXX_USE_CXX11_ABI=1' \
11
+ '-D_DARWIN_USE_64_BIT_INODE=1' \
12
+ '-D_LARGEFILE_SOURCE' \
13
+ '-D_FILE_OFFSET_BITS=64' \
14
+ '-DOPENSSL_NO_PINSHARED' \
15
+ '-DOPENSSL_THREADS' \
16
+ '-DNAPI_CPP_EXCEPTIONS' \
17
+ '-DNAPI_VERSION=8' \
18
+ '-DBUILDING_NODE_EXTENSION' \
19
+ '-DDEBUG' \
20
+ '-D_DEBUG'
21
+
22
+ # Flags passed to all source files.
23
+ CFLAGS_Debug := \
24
+ -O0 \
25
+ -gdwarf-2 \
26
+ -mmacosx-version-min=10.15 \
27
+ -arch \
28
+ arm64 \
29
+ -Wall \
30
+ -Wendif-labels \
31
+ -W \
32
+ -Wno-unused-parameter \
33
+ -Wall \
34
+ -Wextra \
35
+ -Wno-unused-parameter \
36
+ -Wno-vla-extension \
37
+ -Wno-error
38
+
39
+ # Flags passed to only C files.
40
+ CFLAGS_C_Debug := \
41
+ -fno-strict-aliasing
42
+
43
+ # Flags passed to only C++ files.
44
+ CFLAGS_CC_Debug := \
45
+ -std=c++17 \
46
+ -stdlib=libc++ \
47
+ -fno-rtti \
48
+ -O3 \
49
+ -fPIC
50
+
51
+ # Flags passed to only ObjC files.
52
+ CFLAGS_OBJC_Debug :=
53
+
54
+ # Flags passed to only ObjC++ files.
55
+ CFLAGS_OBJCC_Debug :=
56
+
57
+ INCS_Debug := \
58
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/include/node \
59
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/src \
60
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/config \
61
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/openssl/include \
62
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/uv/include \
63
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/zlib \
64
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/v8/include \
65
+ -I/Users/kazu/github/appium-ios-tuntap/node_modules/node-addon-api
66
+
67
+ DEFS_Release := \
68
+ '-DNODE_GYP_MODULE_NAME=tuntap' \
69
+ '-DUSING_UV_SHARED=1' \
70
+ '-DUSING_V8_SHARED=1' \
71
+ '-DV8_DEPRECATION_WARNINGS=1' \
72
+ '-D_GLIBCXX_USE_CXX11_ABI=1' \
73
+ '-D_DARWIN_USE_64_BIT_INODE=1' \
74
+ '-D_LARGEFILE_SOURCE' \
75
+ '-D_FILE_OFFSET_BITS=64' \
76
+ '-DOPENSSL_NO_PINSHARED' \
77
+ '-DOPENSSL_THREADS' \
78
+ '-DNAPI_CPP_EXCEPTIONS' \
79
+ '-DNAPI_VERSION=8' \
80
+ '-DBUILDING_NODE_EXTENSION'
81
+
82
+ # Flags passed to all source files.
83
+ CFLAGS_Release := \
84
+ -O3 \
85
+ -gdwarf-2 \
86
+ -mmacosx-version-min=10.15 \
87
+ -arch \
88
+ arm64 \
89
+ -Wall \
90
+ -Wendif-labels \
91
+ -W \
92
+ -Wno-unused-parameter \
93
+ -Wall \
94
+ -Wextra \
95
+ -Wno-unused-parameter \
96
+ -Wno-vla-extension \
97
+ -Wno-error
98
+
99
+ # Flags passed to only C files.
100
+ CFLAGS_C_Release := \
101
+ -fno-strict-aliasing
102
+
103
+ # Flags passed to only C++ files.
104
+ CFLAGS_CC_Release := \
105
+ -std=c++17 \
106
+ -stdlib=libc++ \
107
+ -fno-rtti \
108
+ -O3 \
109
+ -fPIC
110
+
111
+ # Flags passed to only ObjC files.
112
+ CFLAGS_OBJC_Release :=
113
+
114
+ # Flags passed to only ObjC++ files.
115
+ CFLAGS_OBJCC_Release :=
116
+
117
+ INCS_Release := \
118
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/include/node \
119
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/src \
120
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/config \
121
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/openssl/openssl/include \
122
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/uv/include \
123
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/zlib \
124
+ -I/Users/kazu/Library/Caches/node-gyp/20.19.2/deps/v8/include \
125
+ -I/Users/kazu/github/appium-ios-tuntap/node_modules/node-addon-api
126
+
127
+ OBJS := \
128
+ $(obj).target/$(TARGET)/src/tuntap.o
129
+
130
+ # Add to the list of files we specially track dependencies for.
131
+ all_deps += $(OBJS)
132
+
133
+ # Make sure our dependencies are built before any of us.
134
+ $(OBJS): | $(builddir)/nothing.a
135
+
136
+ # CFLAGS et al overrides must be target-local.
137
+ # See "Target-specific Variable Values" in the GNU Make manual.
138
+ $(OBJS): TOOLSET := $(TOOLSET)
139
+ $(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
140
+ $(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
141
+ $(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
142
+ $(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
143
+
144
+ # Suffix rules, putting all outputs into $(obj).
145
+
146
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
147
+ @$(call do_cmd,cxx,1)
148
+
149
+ # Try building from generated source, too.
150
+
151
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
152
+ @$(call do_cmd,cxx,1)
153
+
154
+ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
155
+ @$(call do_cmd,cxx,1)
156
+
157
+ # End of this set of suffix rules
158
+ ### Rules for final target.
159
+ LDFLAGS_Debug := \
160
+ -framework \
161
+ SystemConfiguration \
162
+ -framework \
163
+ CoreFoundation \
164
+ -undefined dynamic_lookup \
165
+ -Wl,-search_paths_first \
166
+ -mmacosx-version-min=10.15 \
167
+ -arch \
168
+ arm64 \
169
+ -L$(builddir) \
170
+ -stdlib=libc++
171
+
172
+ LIBTOOLFLAGS_Debug := \
173
+ -framework \
174
+ SystemConfiguration \
175
+ -framework \
176
+ CoreFoundation \
177
+ -undefined dynamic_lookup \
178
+ -Wl,-search_paths_first
179
+
180
+ LDFLAGS_Release := \
181
+ -framework \
182
+ SystemConfiguration \
183
+ -framework \
184
+ CoreFoundation \
185
+ -undefined dynamic_lookup \
186
+ -Wl,-search_paths_first \
187
+ -mmacosx-version-min=10.15 \
188
+ -arch \
189
+ arm64 \
190
+ -L$(builddir) \
191
+ -stdlib=libc++
192
+
193
+ LIBTOOLFLAGS_Release := \
194
+ -framework \
195
+ SystemConfiguration \
196
+ -framework \
197
+ CoreFoundation \
198
+ -undefined dynamic_lookup \
199
+ -Wl,-search_paths_first
200
+
201
+ LIBS :=
202
+
203
+ $(builddir)/tuntap.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
204
+ $(builddir)/tuntap.node: LIBS := $(LIBS)
205
+ $(builddir)/tuntap.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
206
+ $(builddir)/tuntap.node: TOOLSET := $(TOOLSET)
207
+ $(builddir)/tuntap.node: $(OBJS) $(builddir)/nothing.a FORCE_DO_CMD
208
+ $(call do_cmd,solink_module)
209
+
210
+ all_deps += $(builddir)/tuntap.node
211
+ # Add target alias
212
+ .PHONY: tuntap
213
+ tuntap: $(builddir)/tuntap.node
214
+
215
+ # Short alias for building this executable.
216
+ .PHONY: tuntap.node
217
+ tuntap.node: $(builddir)/tuntap.node
218
+
219
+ # Add executable to "all" target.
220
+ .PHONY: all
221
+ all: $(builddir)/tuntap.node
222
+
@@ -0,0 +1,40 @@
1
+ export declare class TunTapError extends Error {
2
+ code?: string | undefined;
3
+ constructor(message: string, code?: string | undefined);
4
+ }
5
+ export declare class TunTapPermissionError extends TunTapError {
6
+ constructor(message: string);
7
+ }
8
+ export declare class TunTapDeviceError extends TunTapError {
9
+ constructor(message: string);
10
+ }
11
+ /**
12
+ * TUN/TAP device for IP tunneling
13
+ */
14
+ export declare class TunTap {
15
+ private device;
16
+ private isOpen;
17
+ private isClosed;
18
+ private cleanupHandlers;
19
+ constructor(name?: string);
20
+ open(): boolean;
21
+ close(): boolean;
22
+ read(maxSize?: number): Buffer;
23
+ write(data: Buffer): number;
24
+ get name(): string;
25
+ get fd(): number;
26
+ configure(address: string, mtu?: number): Promise<void>;
27
+ addRoute(destination: string): Promise<void>;
28
+ removeRoute(destination: string): Promise<void>;
29
+ /**
30
+ * Get interface statistics
31
+ */
32
+ getStats(): Promise<{
33
+ rxBytes: number;
34
+ txBytes: number;
35
+ rxPackets: number;
36
+ txPackets: number;
37
+ rxErrors: number;
38
+ txErrors: number;
39
+ }>;
40
+ }