@@ -57,13 +57,13 @@ func gitHubToken(flagToken string) (string, error) {
5757
5858func run () error {
5959 var (
60- serverAddr = flag .String ("addr" , "localhost:8080" , "server address" )
60+ serverAddr = flag .String ("addr" , client . DefaultServerAddress , "server address (hostname:port) " )
6161 org = flag .String ("org" , "" , "GitHub organization to subscribe to (use '*' for all your orgs)" )
6262 token = flag .String ("token" , "" , "GitHub personal access token" )
6363 userEvents = flag .Bool ("user" , false , "Subscribe to your events across all organizations" )
6464 eventTypes = flag .String ("events" , "" , "Comma-separated list of event types to subscribe to (use '*' for all)" )
6565 prs = flag .String ("prs" , "" , "Comma-separated list of PR URLs to subscribe to (max 200)" )
66- useTLS = flag .Bool ("tls " , false , "Use TLS ( wss://)" )
66+ insecure = flag .Bool ("insecure " , false , "Use insecure WebSocket (ws:// instead of wss://)" )
6767 verbose = flag .Bool ("verbose" , false , "Show full event details" )
6868 noReconnect = flag .Bool ("no-reconnect" , false , "Disable automatic reconnection" )
6969 maxRetries = flag .Int ("max-retries" , 0 , "Maximum reconnection attempts (0 = infinite)" )
@@ -104,10 +104,11 @@ func run() error {
104104 return err
105105 }
106106
107- // Build WebSocket URL
108- scheme := "ws"
109- if * useTLS {
110- scheme = "wss"
107+ // Build WebSocket URL - secure by default
108+ scheme := "wss"
109+ if * insecure {
110+ scheme = "ws"
111+ log .Println ("WARNING: Using insecure WebSocket connection (ws://)" )
111112 }
112113 url := fmt .Sprintf ("%s://%s/ws" , scheme , * serverAddr )
113114
0 commit comments