NitroExpose 2.0__py3-none-any.whl → 2.2__py3-none-any.whl
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.
Potentially problematic release.
This version of NitroExpose might be problematic. Click here for more details.
- nitroexpose/cli.py +336 -19
- {nitroexpose-2.0.dist-info → nitroexpose-2.2.dist-info}/METADATA +41 -17
- nitroexpose-2.2.dist-info/RECORD +8 -0
- nitroexpose-2.0.dist-info/RECORD +0 -8
- {nitroexpose-2.0.dist-info → nitroexpose-2.2.dist-info}/WHEEL +0 -0
- {nitroexpose-2.0.dist-info → nitroexpose-2.2.dist-info}/entry_points.txt +0 -0
- {nitroexpose-2.0.dist-info → nitroexpose-2.2.dist-info}/licenses/LICENSE +0 -0
- {nitroexpose-2.0.dist-info → nitroexpose-2.2.dist-info}/top_level.txt +0 -0
nitroexpose/cli.py
CHANGED
|
@@ -9,7 +9,12 @@ import time
|
|
|
9
9
|
import requests
|
|
10
10
|
import signal
|
|
11
11
|
import socket
|
|
12
|
+
import importlib.metadata
|
|
13
|
+
import random
|
|
14
|
+
import string
|
|
15
|
+
import threading
|
|
12
16
|
|
|
17
|
+
# cli.py (Main File)
|
|
13
18
|
# 𝗠𝗮𝗻𝗮𝗴𝗲𝗱 𝗕𝘆 @Nactire
|
|
14
19
|
|
|
15
20
|
def print_green(text):
|
|
@@ -23,19 +28,39 @@ def print_yellow(text):
|
|
|
23
28
|
|
|
24
29
|
def print_turquoise(text):
|
|
25
30
|
print("\033[38;2;0;255;234m" + text + "\033[0m")
|
|
31
|
+
|
|
32
|
+
def get_version():
|
|
33
|
+
try:
|
|
34
|
+
version = importlib.metadata.version('nitroexpose')
|
|
35
|
+
return version
|
|
36
|
+
except importlib.metadata.PackageNotFoundError:
|
|
37
|
+
return "Unknown"
|
|
26
38
|
|
|
27
39
|
def run_command(cmd):
|
|
28
|
-
process = subprocess.Popen(
|
|
40
|
+
process = subprocess.Popen(
|
|
41
|
+
cmd,
|
|
42
|
+
shell=True,
|
|
43
|
+
stdout=subprocess.DEVNULL,
|
|
44
|
+
stderr=subprocess.DEVNULL
|
|
45
|
+
)
|
|
29
46
|
process.wait()
|
|
30
47
|
return process.returncode
|
|
31
48
|
|
|
32
49
|
def is_installed(cmd):
|
|
33
|
-
return subprocess.call(
|
|
50
|
+
return subprocess.call(
|
|
51
|
+
f"{cmd} > /dev/null 2>&1",
|
|
52
|
+
shell=True,
|
|
53
|
+
stdout=subprocess.DEVNULL,
|
|
54
|
+
stderr=subprocess.DEVNULL
|
|
55
|
+
) == 0
|
|
34
56
|
|
|
35
57
|
def is_certbot_nginx_plugin_installed():
|
|
36
58
|
try:
|
|
37
59
|
result = subprocess.check_output(
|
|
38
|
-
"dpkg -l | grep python3-certbot-nginx",
|
|
60
|
+
"dpkg -l | grep python3-certbot-nginx",
|
|
61
|
+
shell=True,
|
|
62
|
+
text=True,
|
|
63
|
+
stderr=subprocess.DEVNULL
|
|
39
64
|
)
|
|
40
65
|
return "python3-certbot-nginx" in result
|
|
41
66
|
except subprocess.CalledProcessError:
|
|
@@ -51,6 +76,18 @@ def is_port_listening(port):
|
|
|
51
76
|
except Exception:
|
|
52
77
|
return False
|
|
53
78
|
|
|
79
|
+
def get_system_architecture():
|
|
80
|
+
try:
|
|
81
|
+
result = subprocess.check_output("uname -m", shell=True, text=True).strip()
|
|
82
|
+
return result
|
|
83
|
+
except Exception:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
def generate_random_process_name():
|
|
87
|
+
letters = ''.join(random.choices(string.ascii_lowercase, k=5))
|
|
88
|
+
numbers = ''.join(random.choices(string.digits, k=5))
|
|
89
|
+
return letters + numbers
|
|
90
|
+
|
|
54
91
|
def restricted_input(prompt, allowed_pattern):
|
|
55
92
|
def handle_sigint(signum, frame):
|
|
56
93
|
print("\n\n")
|
|
@@ -92,34 +129,312 @@ def restricted_input(prompt, allowed_pattern):
|
|
|
92
129
|
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
|
|
93
130
|
return buffer
|
|
94
131
|
|
|
95
|
-
def
|
|
132
|
+
def install_and_verify_package(package_name, check_cmd, install_cmds):
|
|
133
|
+
print_green(f"Installing {package_name} ...")
|
|
134
|
+
|
|
135
|
+
for cmd in install_cmds:
|
|
136
|
+
run_command(cmd)
|
|
137
|
+
|
|
138
|
+
if check_cmd():
|
|
139
|
+
print_green(f"{package_name} installed.")
|
|
140
|
+
return True
|
|
141
|
+
else:
|
|
142
|
+
print_red(f"{package_name} installing Error.")
|
|
143
|
+
sys.exit(1)
|
|
144
|
+
|
|
145
|
+
def is_valid_domain(domain):
|
|
146
|
+
if "http://" in domain or "https://" in domain or " " in domain:
|
|
147
|
+
return False
|
|
148
|
+
|
|
149
|
+
if "." not in domain:
|
|
150
|
+
return False
|
|
151
|
+
|
|
152
|
+
pattern = r'^[a-zA-Z0-9\.\-]+$'
|
|
153
|
+
if not re.match(pattern, domain):
|
|
154
|
+
return False
|
|
155
|
+
|
|
156
|
+
return True
|
|
157
|
+
|
|
158
|
+
def is_subdomain(domain):
|
|
159
|
+
parts = domain.split(".")
|
|
160
|
+
return len(parts) > 2
|
|
161
|
+
|
|
162
|
+
def remove_domain(domain):
|
|
96
163
|
if os.geteuid() != 0:
|
|
97
164
|
print_red("\nPlease Use Root Environment.\n")
|
|
98
165
|
sys.exit(1)
|
|
99
|
-
|
|
166
|
+
|
|
167
|
+
if not is_valid_domain(domain):
|
|
168
|
+
print_red("\nDomain Format Not Valid.\n")
|
|
169
|
+
sys.exit(1)
|
|
170
|
+
|
|
100
171
|
if not is_installed("nginx -v"):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
172
|
+
install_and_verify_package(
|
|
173
|
+
"NGINX",
|
|
174
|
+
lambda: is_installed("nginx -v"),
|
|
175
|
+
[
|
|
176
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
177
|
+
"sudo apt install -y nginx",
|
|
178
|
+
"sudo systemctl start nginx",
|
|
179
|
+
"sudo systemctl enable nginx"
|
|
180
|
+
]
|
|
181
|
+
)
|
|
106
182
|
else:
|
|
107
183
|
print_green("NGINX installed.")
|
|
108
184
|
|
|
109
185
|
if not is_installed("certbot --version"):
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
186
|
+
install_and_verify_package(
|
|
187
|
+
"Certbot",
|
|
188
|
+
lambda: is_installed("certbot --version"),
|
|
189
|
+
[
|
|
190
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
191
|
+
"sudo apt install -y certbot python3-certbot-nginx"
|
|
192
|
+
]
|
|
193
|
+
)
|
|
113
194
|
else:
|
|
114
195
|
print_green("Certbot installed.")
|
|
115
196
|
|
|
116
197
|
if not is_certbot_nginx_plugin_installed():
|
|
117
|
-
|
|
198
|
+
install_and_verify_package(
|
|
199
|
+
"python3-certbot-nginx plugin",
|
|
200
|
+
is_certbot_nginx_plugin_installed,
|
|
201
|
+
[
|
|
202
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
203
|
+
"sudo apt install -y python3-certbot-nginx"
|
|
204
|
+
]
|
|
205
|
+
)
|
|
206
|
+
else:
|
|
207
|
+
print_green("python3-certbot-nginx plugin installed.")
|
|
208
|
+
|
|
209
|
+
print("\n")
|
|
210
|
+
|
|
211
|
+
available_path = f"/etc/nginx/sites-available/{domain}"
|
|
212
|
+
enabled_path = f"/etc/nginx/sites-enabled/{domain}"
|
|
213
|
+
|
|
214
|
+
available_exists = os.path.exists(available_path)
|
|
215
|
+
enabled_exists = os.path.exists(enabled_path)
|
|
216
|
+
|
|
217
|
+
domain_type = "Subdomain" if is_subdomain(domain) else "Domain"
|
|
218
|
+
|
|
219
|
+
if not available_exists and not enabled_exists:
|
|
220
|
+
run_command(f"sudo rm -f {available_path}")
|
|
221
|
+
run_command(f"sudo rm -f {enabled_path}")
|
|
222
|
+
run_command("sudo systemctl reload nginx")
|
|
223
|
+
print_red(f"Targeted {domain_type} Doesn't Exist in Your Server.\n")
|
|
224
|
+
sys.exit(1)
|
|
225
|
+
elif not available_exists or not enabled_exists:
|
|
226
|
+
run_command(f"sudo rm -f {available_path}")
|
|
227
|
+
run_command(f"sudo rm -f {enabled_path}")
|
|
228
|
+
run_command("sudo systemctl reload nginx")
|
|
229
|
+
print_red(f"Targeted {domain_type} Doesn't Exist in Your Server.\n")
|
|
230
|
+
sys.exit(1)
|
|
231
|
+
else:
|
|
232
|
+
run_command(f"sudo rm -f {available_path}")
|
|
233
|
+
run_command(f"sudo rm -f {enabled_path}")
|
|
234
|
+
run_command("sudo systemctl reload nginx")
|
|
235
|
+
print_green(f"\n{domain_type} Removed Successfully.\n")
|
|
236
|
+
sys.exit(0)
|
|
237
|
+
|
|
238
|
+
def freehost_mode():
|
|
239
|
+
if os.geteuid() != 0:
|
|
240
|
+
print_red("\nPlease Use Root Environment.\n")
|
|
241
|
+
sys.exit(1)
|
|
242
|
+
|
|
243
|
+
if not is_installed("expect -v"):
|
|
244
|
+
print_green("Installing Expect ...")
|
|
118
245
|
run_command("sudo apt update -o Acquire::AllowInsecureRepositories=true")
|
|
119
|
-
run_command("sudo apt install -y
|
|
246
|
+
run_command("sudo apt install -y expect")
|
|
247
|
+
|
|
248
|
+
if not is_installed("expect -v"):
|
|
249
|
+
print_red("Expect installing Error.")
|
|
250
|
+
sys.exit(1)
|
|
251
|
+
print_green("Expect installed.")
|
|
252
|
+
|
|
253
|
+
if not is_installed("cloudflared --version"):
|
|
254
|
+
print_green("Installing CloudServer ...")
|
|
255
|
+
|
|
256
|
+
arch = get_system_architecture()
|
|
257
|
+
|
|
258
|
+
if arch in ["x86_64", "aarch64"]:
|
|
259
|
+
install_cmds = [
|
|
260
|
+
"wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64",
|
|
261
|
+
"chmod +x cloudflared-linux-amd64",
|
|
262
|
+
"sudo mv cloudflared-linux-amd64 /usr/local/bin/cloudflared"
|
|
263
|
+
]
|
|
264
|
+
elif arch in ["armv7l", "armhf"]:
|
|
265
|
+
install_cmds = [
|
|
266
|
+
"wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm",
|
|
267
|
+
"chmod +x cloudflared-linux-arm",
|
|
268
|
+
"sudo mv cloudflared-linux-arm /usr/local/bin/cloudflared"
|
|
269
|
+
]
|
|
270
|
+
else:
|
|
271
|
+
print_red("Unsupported architecture.")
|
|
272
|
+
sys.exit(1)
|
|
273
|
+
|
|
274
|
+
for cmd in install_cmds:
|
|
275
|
+
run_command(cmd)
|
|
276
|
+
|
|
277
|
+
if is_installed("cloudflared --version"):
|
|
278
|
+
print_green("CloudServer installed.")
|
|
279
|
+
else:
|
|
280
|
+
print_red("CloudServer installing Error.")
|
|
281
|
+
sys.exit(1)
|
|
282
|
+
else:
|
|
283
|
+
print_green("CloudServer installed.")
|
|
284
|
+
|
|
285
|
+
print("\n")
|
|
286
|
+
|
|
287
|
+
print_turquoise("┌─╼ Enter Port To Expose")
|
|
288
|
+
port = restricted_input("\033[38;2;0;255;234m└────╼ ❯❯❯ \033[0m", r"[0-9]+")
|
|
289
|
+
|
|
290
|
+
print("\n")
|
|
291
|
+
|
|
292
|
+
if not is_port_listening(port):
|
|
293
|
+
print_red("Port Not Listening, Operation Failed.")
|
|
294
|
+
sys.exit(1)
|
|
295
|
+
|
|
296
|
+
process_name = generate_random_process_name()
|
|
297
|
+
|
|
298
|
+
expect_script = f"""#!/usr/bin/expect -f
|
|
299
|
+
set timeout 20
|
|
300
|
+
spawn supercore cloudflared tunnel --url http://localhost:{port}
|
|
301
|
+
expect "└────╼ ❯❯❯"
|
|
302
|
+
send "{process_name}\\r"
|
|
303
|
+
expect eof
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
script_path = f"/tmp/cloudflared_tunnel_{port}.exp"
|
|
307
|
+
with open(script_path, "w") as f:
|
|
308
|
+
f.write(expect_script)
|
|
309
|
+
|
|
310
|
+
os.chmod(script_path, 0o755)
|
|
311
|
+
|
|
312
|
+
try:
|
|
313
|
+
process = subprocess.Popen(
|
|
314
|
+
[script_path],
|
|
315
|
+
stdout=subprocess.PIPE,
|
|
316
|
+
stderr=subprocess.STDOUT,
|
|
317
|
+
text=True,
|
|
318
|
+
bufsize=1
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
output_lines = []
|
|
322
|
+
url_found = False
|
|
323
|
+
extracted_url = None
|
|
324
|
+
|
|
325
|
+
print_yellow("Connecting to CloudServer...")
|
|
326
|
+
|
|
327
|
+
start_time = time.time()
|
|
328
|
+
while time.time() - start_time < 15:
|
|
329
|
+
line = process.stdout.readline()
|
|
330
|
+
if line:
|
|
331
|
+
output_lines.append(line)
|
|
332
|
+
url_pattern = r'https://[a-z0-9\-]+\.trycloudflare\.com'
|
|
333
|
+
match = re.search(url_pattern, line)
|
|
334
|
+
if match:
|
|
335
|
+
extracted_url = match.group(0)
|
|
336
|
+
url_found = True
|
|
337
|
+
break
|
|
338
|
+
|
|
339
|
+
if process.poll() is not None:
|
|
340
|
+
break
|
|
341
|
+
|
|
342
|
+
time.sleep(0.1)
|
|
343
|
+
|
|
344
|
+
if not url_found:
|
|
345
|
+
remaining = process.stdout.read()
|
|
346
|
+
if remaining:
|
|
347
|
+
output_lines.append(remaining)
|
|
348
|
+
full_output = ''.join(output_lines)
|
|
349
|
+
url_pattern = r'https://[a-z0-9\-]+\.trycloudflare\.com'
|
|
350
|
+
match = re.search(url_pattern, full_output)
|
|
351
|
+
if match:
|
|
352
|
+
extracted_url = match.group(0)
|
|
353
|
+
url_found = True
|
|
354
|
+
|
|
355
|
+
process.wait()
|
|
356
|
+
|
|
357
|
+
if url_found and extracted_url:
|
|
358
|
+
print("\n")
|
|
359
|
+
print_green(f"Exposed Successfully On Free Subdomain.\n")
|
|
360
|
+
print_green(f"Exposed On: {extracted_url}\n")
|
|
361
|
+
print_green(f"Port: {port}\n")
|
|
362
|
+
print_green(f"SSL Installed Using Google Trust Services\n")
|
|
363
|
+
print_yellow(f"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -")
|
|
364
|
+
print_yellow(f"If You Like NitroExpose, Please Support Us by:\n")
|
|
365
|
+
print_yellow(f" * Join Our Telegram Channel: https://t.me/NacDevs")
|
|
366
|
+
print_yellow(f" * Please Star Our Project: https://github.com/yuvrajmodz/NitroExpose")
|
|
367
|
+
print_yellow(f"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")
|
|
368
|
+
sys.exit(0)
|
|
369
|
+
else:
|
|
370
|
+
print_red("Server is Busy, Try Again Later.")
|
|
371
|
+
os.remove(script_path)
|
|
372
|
+
sys.exit(1)
|
|
373
|
+
|
|
374
|
+
except Exception as e:
|
|
375
|
+
print_red("Server is Busy, Try Again Later.")
|
|
376
|
+
if os.path.exists(script_path):
|
|
377
|
+
os.remove(script_path)
|
|
378
|
+
sys.exit(1)
|
|
379
|
+
|
|
380
|
+
def main():
|
|
381
|
+
if len(sys.argv) == 2 and sys.argv[1] in ["-v", "--v"]:
|
|
382
|
+
version = get_version()
|
|
383
|
+
print_green(f"V{version}")
|
|
384
|
+
sys.exit(0)
|
|
385
|
+
|
|
386
|
+
if len(sys.argv) == 2 and sys.argv[1] == "--freehost":
|
|
387
|
+
freehost_mode()
|
|
388
|
+
return
|
|
389
|
+
|
|
390
|
+
if len(sys.argv) == 3 and sys.argv[1] == "remove":
|
|
391
|
+
domain = sys.argv[2]
|
|
392
|
+
remove_domain(domain)
|
|
393
|
+
return
|
|
394
|
+
|
|
395
|
+
if os.geteuid() != 0:
|
|
396
|
+
print_red("\nPlease Use Root Environment.\n")
|
|
397
|
+
sys.exit(1)
|
|
398
|
+
|
|
399
|
+
if not is_installed("nginx -v"):
|
|
400
|
+
install_and_verify_package(
|
|
401
|
+
"NGINX",
|
|
402
|
+
lambda: is_installed("nginx -v"),
|
|
403
|
+
[
|
|
404
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
405
|
+
"sudo apt install -y nginx",
|
|
406
|
+
"sudo systemctl start nginx",
|
|
407
|
+
"sudo systemctl enable nginx"
|
|
408
|
+
]
|
|
409
|
+
)
|
|
410
|
+
else:
|
|
411
|
+
print_green("NGINX installed.")
|
|
412
|
+
|
|
413
|
+
if not is_installed("certbot --version"):
|
|
414
|
+
install_and_verify_package(
|
|
415
|
+
"Certbot",
|
|
416
|
+
lambda: is_installed("certbot --version"),
|
|
417
|
+
[
|
|
418
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
419
|
+
"sudo apt install -y certbot python3-certbot-nginx"
|
|
420
|
+
]
|
|
421
|
+
)
|
|
422
|
+
else:
|
|
423
|
+
print_green("Certbot installed.")
|
|
424
|
+
|
|
425
|
+
if not is_certbot_nginx_plugin_installed():
|
|
426
|
+
install_and_verify_package(
|
|
427
|
+
"python3-certbot-nginx plugin",
|
|
428
|
+
is_certbot_nginx_plugin_installed,
|
|
429
|
+
[
|
|
430
|
+
"sudo apt update -o Acquire::AllowInsecureRepositories=true",
|
|
431
|
+
"sudo apt install -y python3-certbot-nginx"
|
|
432
|
+
]
|
|
433
|
+
)
|
|
120
434
|
else:
|
|
121
435
|
print_green("python3-certbot-nginx plugin installed.")
|
|
122
|
-
|
|
436
|
+
|
|
437
|
+
print("\n")
|
|
123
438
|
|
|
124
439
|
print_turquoise("┌─╼ Enter Domain Or Subdomain")
|
|
125
440
|
domain = restricted_input("\033[38;2;0;255;234m└────╼ ❯❯❯ \033[0m", r"[a-zA-Z0-9\.\-]")
|
|
@@ -187,6 +502,8 @@ server {{
|
|
|
187
502
|
run_command(f"sudo rm -f /etc/nginx/sites-available/{domain}")
|
|
188
503
|
run_command(f"sudo rm -f /etc/nginx/sites-enabled/{domain}")
|
|
189
504
|
run_command("sudo systemctl reload nginx")
|
|
505
|
+
|
|
506
|
+
print_yellow("SSL Cert installing...")
|
|
190
507
|
|
|
191
508
|
nginx_conf = f"""
|
|
192
509
|
server {{
|
|
@@ -213,7 +530,7 @@ server {{
|
|
|
213
530
|
run_command(f"sudo certbot --nginx -d {domain} --non-interactive --agree-tos --email nitroexpose@gmail.com")
|
|
214
531
|
run_command("sudo systemctl reload nginx")
|
|
215
532
|
|
|
216
|
-
print_yellow("
|
|
533
|
+
print_yellow("SSL Certificate Checking...")
|
|
217
534
|
time.sleep(2)
|
|
218
535
|
|
|
219
536
|
ssl_installed = False
|
|
@@ -228,7 +545,7 @@ server {{
|
|
|
228
545
|
|
|
229
546
|
print("\n")
|
|
230
547
|
if ssl_installed:
|
|
231
|
-
print_green(f"Exposed Successfully
|
|
548
|
+
print_green(f"Exposed Successfully On Your Domain\n")
|
|
232
549
|
print_green(f"Exposed On: https://{domain}\n")
|
|
233
550
|
print_green(f"Port: {port}\n")
|
|
234
551
|
print_green(f"SSL Installed Using Let's Encrypt.\n")
|
|
@@ -238,7 +555,7 @@ server {{
|
|
|
238
555
|
print_yellow(f" * Please Star Our Project: https://github.com/yuvrajmodz/NitroExpose")
|
|
239
556
|
print_yellow(f"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n")
|
|
240
557
|
else:
|
|
241
|
-
print_green(f"Exposed Successfully
|
|
558
|
+
print_green(f"Exposed Successfully On Your Domain\n")
|
|
242
559
|
print_green(f"Exposed On: http://{domain}\n")
|
|
243
560
|
print_green(f"Port: {port}\n")
|
|
244
561
|
print_yellow(f"Unfortunately, please verify your records carefully. Your server is exposed on your domain, and we are experiencing difficulties while attempting to install an SSL certificate.\n\n")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NitroExpose
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2
|
|
4
4
|
Summary: Advanced CLI To Expose Port To Your Domain.
|
|
5
5
|
Home-page: https://github.com/yuvrajmodz/NitroExpose
|
|
6
6
|
Author: @NacDevs
|
|
@@ -12,6 +12,7 @@ Requires-Python: >=3.8
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: supercore
|
|
15
16
|
Dynamic: author
|
|
16
17
|
Dynamic: author-email
|
|
17
18
|
Dynamic: classifier
|
|
@@ -25,7 +26,7 @@ Dynamic: summary
|
|
|
25
26
|
|
|
26
27
|
## NitroExpose
|
|
27
28
|
|
|
28
|
-
**Letest Version:** 2.
|
|
29
|
+
**Letest Version:** 2.2
|
|
29
30
|
**Developer:** @Nactire
|
|
30
31
|
**Git Repo:** [NitroExpose](https://github.com/yuvrajmodz/NitroExpose)
|
|
31
32
|
|
|
@@ -35,6 +36,8 @@ Dynamic: summary
|
|
|
35
36
|
**NitroExpose** is an advanced CLI tool that allows you to **instantly expose any local port to your custom domain,**
|
|
36
37
|
**automatic SSL installation** Powered by Let's Encrypt.
|
|
37
38
|
|
|
39
|
+
If You Don't Have Domain, No Problem We Also Provide Free Subdomain To Host Your Local Port Service On Subdomain With Https.
|
|
40
|
+
|
|
38
41
|
It provides a **one-command deployment system** for developers who want to run their local apps (Flask, FastAPI, Node.js, etc.) directly on a live domain without manually configuring NGINX or DNS records.
|
|
39
42
|
|
|
40
43
|
|
|
@@ -56,21 +59,12 @@ It provides a **one-command deployment system** for developers who want to run t
|
|
|
56
59
|
- **apt** Package Manager Required
|
|
57
60
|
|
|
58
61
|
|
|
59
|
-
##
|
|
62
|
+
## 🌊 Module installation
|
|
60
63
|
|
|
61
64
|
```bash
|
|
62
65
|
pip install NitroExpose --break-system-packages
|
|
63
66
|
```
|
|
64
67
|
|
|
65
|
-
## 🌊 Optional installation
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
sudo apt update -y
|
|
69
|
-
sudo apt install nginx -y
|
|
70
|
-
sudo apt install certbot -y
|
|
71
|
-
sudo apt install python3-certbot-nginx -y
|
|
72
|
-
```
|
|
73
|
-
|
|
74
68
|
## 🧭 Usage Guide
|
|
75
69
|
|
|
76
70
|
Step 1 – Point Your Vps/Server IP in Your Domain Records:
|
|
@@ -80,25 +74,55 @@ Step 1 – Point Your Vps/Server IP in Your Domain Records:
|
|
|
80
74
|
**IPv4**: Your Vps Server IP
|
|
81
75
|
**TTL**: Auto
|
|
82
76
|
|
|
83
|
-
|
|
84
77
|
Step 2 – **Launch NitroExpose**
|
|
85
78
|
```bash
|
|
86
79
|
NitroExpose
|
|
87
80
|
```
|
|
88
81
|
|
|
89
|
-
|
|
90
82
|
Step 3 – **Enter Your Domain Or Subdomain**
|
|
91
83
|
```bash
|
|
92
84
|
┌─╼ Enter Domain Or Subdomain
|
|
93
85
|
└────╼ ❯❯❯ myproject.example.com
|
|
94
86
|
```
|
|
95
87
|
|
|
96
|
-
|
|
97
|
-
Step 4 – **Enter the Local Port to Expose**
|
|
88
|
+
Step 4 – **Enter Your Local Port to Expose**
|
|
98
89
|
```bash
|
|
99
90
|
┌─╼ Enter Port To Expose
|
|
100
91
|
└────╼ ❯❯❯ 8000
|
|
101
92
|
```
|
|
102
93
|
|
|
94
|
+
✨ **Now it Will Take 8 to 9 Seconds For Verification And Then Boom! Your Local Port Successfully Exposed To Your Public Domain/Subdomain**.
|
|
103
95
|
|
|
104
|
-
|
|
96
|
+
## 🌐 Host On Free Subdomain (Cloudflared).
|
|
97
|
+
|
|
98
|
+
Step 1 – **Launch NitroExpose With FreeHost**
|
|
99
|
+
```bash
|
|
100
|
+
NitroExpose --freehost
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Step 2 – **Enter Your Local Port To Expose On Subdomain**
|
|
104
|
+
```bash
|
|
105
|
+
┌─╼ Enter Port To Expose
|
|
106
|
+
└────╼ ❯❯❯ 8001
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
✨ **Now it Will Take 8 to 9 Seconds To Connect CloudServer And Then Your Service Successfully Exposed To Our Subdomain With 24/7.**
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## 🎯 To Remove Domain/Subdomain
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
NitroExpose remove <domain/subdomain>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 🎯 Domain/Subdomain Remove Example
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
NitroExpose remove myproject.example.com
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## To Check Package Version
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
NitroExpose --v
|
|
128
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
nitroexpose/__init__.py,sha256=jzli5z-wSkAiPccBUXLYoXWqtFxcoSs4cfupy9yjmFM,161
|
|
2
|
+
nitroexpose/cli.py,sha256=C3lkvEryTstXDww37MSM-p3QBIfx254gecQrb5tuwxU,18026
|
|
3
|
+
nitroexpose-2.2.dist-info/licenses/LICENSE,sha256=i_D1gc46cD__O4L8jy8izzueLV1F5ut89qyA6EOynaQ,255
|
|
4
|
+
nitroexpose-2.2.dist-info/METADATA,sha256=yjIc-n2WUapbjBz8GnPaFxMOwWN5pHmn-62Pno0G-To,3255
|
|
5
|
+
nitroexpose-2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
nitroexpose-2.2.dist-info/entry_points.txt,sha256=xmBtMDqH7wn0ZT8MtQYWLsEIZNvVqAi-F9nUrxVoq8w,53
|
|
7
|
+
nitroexpose-2.2.dist-info/top_level.txt,sha256=plDtsFeO3ei4PeJvvK2DjGFjFxZ4lnKSHHH4xeC8ei8,12
|
|
8
|
+
nitroexpose-2.2.dist-info/RECORD,,
|
nitroexpose-2.0.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
nitroexpose/__init__.py,sha256=jzli5z-wSkAiPccBUXLYoXWqtFxcoSs4cfupy9yjmFM,161
|
|
2
|
-
nitroexpose/cli.py,sha256=HEyu7309XOmoJZnEIgIMiOY9sQB5Lb7rIFgv_H4RLWY,7942
|
|
3
|
-
nitroexpose-2.0.dist-info/licenses/LICENSE,sha256=i_D1gc46cD__O4L8jy8izzueLV1F5ut89qyA6EOynaQ,255
|
|
4
|
-
nitroexpose-2.0.dist-info/METADATA,sha256=YQtaxJxxMMk6i8lt0bNa2Z98ifm7PndOlGe1IGA7wwo,2613
|
|
5
|
-
nitroexpose-2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
nitroexpose-2.0.dist-info/entry_points.txt,sha256=xmBtMDqH7wn0ZT8MtQYWLsEIZNvVqAi-F9nUrxVoq8w,53
|
|
7
|
-
nitroexpose-2.0.dist-info/top_level.txt,sha256=plDtsFeO3ei4PeJvvK2DjGFjFxZ4lnKSHHH4xeC8ei8,12
|
|
8
|
-
nitroexpose-2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|