Rebrand to GlitchCraft with IPv6 support

Changes:
- Renamed from "Text Corruptor" to "GlitchCraft"
- New slogan: "Artisanal text corruption, served fresh!"
- Updated server to support both IPv4 and IPv6 (dual-stack)
- Server now listens on all interfaces (::) instead of just localhost
- Updated all references in code and documentation

The new name reflects both the glitch aesthetic and the craftsmanship
of creating beautifully corrupted text, with a playful tone.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-18 20:03:51 +02:00
commit 4e58281d51
7 changed files with 38 additions and 16 deletions

View file

@ -1,12 +1,13 @@
#!/usr/bin/env python3
"""
Simple HTTP server for testing the Text Corruptor PWA
Simple HTTP server for testing the GlitchCraft PWA
Run with: python3 server.py
Then open http://localhost:8000/ in your browser
"""
import http.server
import socketserver
import socket
import os
PORT = 8000
@ -14,8 +15,21 @@ PORT = 8000
DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), "app")
class DualStackServer(socketserver.TCPServer):
"""TCP server that supports both IPv4 and IPv6."""
address_family = socket.AF_INET6
def __init__(self, *args, **kwargs):
# Disable dual stack to make it work on all systems
# Some systems have it enabled by default, some don't
super().__init__(*args, **kwargs)
# Enable dual stack - listen on both IPv4 and IPv6
self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
"""Custom HTTP request handler for serving the Text Corruptor PWA."""
"""Custom HTTP request handler for serving the GlitchCraft PWA."""
def __init__(self, *args, **kwargs):
super().__init__(*args, directory=DIRECTORY, **kwargs)
@ -29,8 +43,16 @@ class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
if __name__ == "__main__":
with socketserver.TCPServer(("", PORT), MyHTTPRequestHandler) as httpd:
print(f"Server running at http://localhost:{PORT}/")
# Listen on all interfaces (:: for IPv6, which also handles IPv4 with dual stack)
HOST = "::" # Listen on all interfaces (IPv6 and IPv4)
with DualStackServer((HOST, PORT), MyHTTPRequestHandler) as httpd:
print(f"Server running on all interfaces at port {PORT}")
print(f"Access at:")
print(f" http://localhost:{PORT}/")
print(f" http://127.0.0.1:{PORT}/ (IPv4)")
print(f" http://[::1]:{PORT}/ (IPv6)")
print(f" http://<your-ip>:{PORT}/")
print(f"Serving files from: {DIRECTORY}")
print("Press Ctrl+C to stop the server")
try: