Removing the replit "webview" when theres no http server

Question:
How do I remove the web view, through there’s no HTTP server running, except a telnet server?

Repl link/Link to where the bug appears:
https://replit.com/@jenekif499/Telnet-server?v=1

Screenshots, links, or other helpful context:

import socket,threading,os

host = ''
port = 5000

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((host, port))
server.listen(4)
print('Telnet server is now running.')

def listen():
  while True:
    client, addr = server.accept()
    client.send(b'Welcome to my server!\n')
    while True:
      data = client.recv(1024)
      if not data:
        break
      client.send('You have typed:'.encode())
      client.send(data)
    client.close()
threading.Thread(target=listen).start()
os.system('telnet localhost 5000')

Hi @jenekif499 !
What is the purpose of this application?

Its an template for people to make their own telnet servers… (if replit supports telnet port-forwarding)

@jenekif499 Replit doesn’t use localhost, so you’ll need to make the host 0.0.0.0.

I just did it, but web view still being shown. Also putty, some one telnet things, cannot connect to it (Connection timed out)

Does opening the website in a new tab yield any results?

Well…

(No telnet command.)
(With telnet running, yes its nothing.)

Does the program work when you close the Webview?

Well yeah, but webview opens again every time i run it. :confused:

@NateDhaliwal The issue here is that the webview opens at all, since it’s not a server that can talk to HTTP(S) requests.

I would think that it because it is opening a port, Replit assumes that it is a web application, but I’m not entirely certain.

1 Like

That’s true, but there should be a way to disable the webview for cases like this (IMO at least)

Agreed. Maybe make a feature request?

1 Like