package main

import (
	"flag"
	"fmt"
	"log"
	"os"

	"github.com/azoic/wormhole-server/internal/server"
)

var (
	version   = "v1.0.0"
	buildTime = "unknown"
)

func main() {
	configPath := flag.String("config", "configs/server.yaml", "Configuration file path")
	showVersion := flag.Bool("version", false, "Show version information")
	flag.Parse()

	if *showVersion {
		fmt.Printf("Wormhole SOCKS5 Server %s\n", version)
		fmt.Printf("Build time: %s\n", buildTime)
		os.Exit(0)
	}

	fmt.Printf("🚀 Starting Wormhole SOCKS5 Server %s\n", version)
	fmt.Printf("📄 Config: %s\n", *configPath)

	// TODO: 实现完整的服务器逻辑
	srv := server.NewServer()
	if err := srv.Start(*configPath); err != nil {
		log.Fatalf("Server failed: %v", err)
	}
}
