lea97338 commited on
Commit
f2ce66a
·
verified ·
1 Parent(s): a439ccc

Update F.py

Browse files
Files changed (1) hide show
  1. F.py +9 -7
F.py CHANGED
@@ -1,16 +1,18 @@
1
- import time
2
  import ngrok
 
3
 
4
- # Crée le tunnel et redirige directement vers votre port (ex: 8000)
5
- listener = ngrok.forward(
6
- 8188,
7
- authtoken="3IKq23oaCZLQzw7gyReFXkiHOtp_726tyz1mkexyHTHxUtwwb",
8
  )
9
 
10
- print(f" URL publique générée : {listener}")
 
11
 
 
12
  try:
13
  while True:
14
  time.sleep(1)
15
  except KeyboardInterrupt:
16
- print("\n Fermeture du tunnel.")
 
 
1
  import ngrok
2
+ import time
3
 
4
+ # Ouverture du tunnel avec votre jeton d'authentification
5
+ listener = ngrok.connect(
6
+ addr=8180,
7
+ authtoken="3IKq23oaCZLQzw7gyReFXkiHOtp_726tyz1mkexyHTHxUtwwb"
8
  )
9
 
10
+ # Affichage de l'URL publique générée
11
+ print(f"✅ Tunnel actif ! Accès public via : {listener.url()}")
12
 
13
+ # Maintien du script en cours d'exécution
14
  try:
15
  while True:
16
  time.sleep(1)
17
  except KeyboardInterrupt:
18
+ print("\n👋 Fermeture du tunnel ngrok.")