-
-
Save grigory51/b48dcf3c582c1fbc4bfa56fcd4acd0e6 to your computer and use it in GitHub Desktop.
quick ipv6 http server using python's SimpleHttpServer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class HTTPServerV6(HTTPServer): | |
address_family = socket.AF_INET6 | |
def main(): | |
server = HTTPServerV6(('::', 8081), SimpleHTTPRequestHandler) | |
server.serve_forever() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment