Skip to content

Commit ceaf86c

Browse files
committed
changes default ports
1 parent 6c6dead commit ceaf86c

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"--accept-multiclient",
1717
"--",
1818
"--debug=true",
19-
"--derp-port=50052",
20-
"--asur-port=50053",
21-
"--oginy-port=50051"
19+
"--derp-port=59992",
20+
"--asur-port=59993",
21+
"--oginy-port=59991"
2222
],
2323
"isBackground": true,
2424
"problemMatcher": {
@@ -65,7 +65,7 @@
6565
{
6666
"label": "Build and Run with Sudo",
6767
"type": "shell",
68-
"command": "go build -o transparent-cache-test test.go && sudo ./transparent-cache-test --debug=true --derp-port=50052 --asur-port=50053 --oginy-port=50051",
68+
"command": "go build -o transparent-cache-test test.go && sudo ./transparent-cache-test --debug=true --derp-port=59992 --asur-port=59993 --oginy-port=59991",
6969
"group": {
7070
"kind": "build",
7171
"isDefault": true

pkg/app/app.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ type TransparentCacheSettings struct {
9393
}
9494

9595
func (t *TransparentCacheSettings) ApplyDefaults() {
96-
if t.DerpPort == 0 {
97-
t.DerpPort = 50052
98-
}
9996
if t.OginyPort == 0 {
100-
t.OginyPort = 50051
97+
t.OginyPort = 59991
98+
}
99+
if t.DerpPort == 0 {
100+
t.DerpPort = 59992
101101
}
102102
if t.AsurPort == 0 {
103-
t.AsurPort = 50053
103+
t.AsurPort = 59993
104104
}
105105
}
106106

pkg/transparent-cache/derp/client/client_twirp/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (c *TwirpClient) FinalizeCacheEntryUpload(ctx context.Context, req *cachepb
109109

110110
func main() {
111111
// Create Twirp client
112-
client := NewTwirpClient("http://localhost:50051")
112+
client := NewTwirpClient("http://localhost:59991")
113113

114114
// Create context
115115
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)

pkg/transparent-cache/derp/client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func main() {
1717
}
1818

1919
// Create Twirp client using the generated client
20-
client := cachepb.NewCacheServiceJSONClient("http://localhost:50051", httpClient)
20+
client := cachepb.NewCacheServiceJSONClient("http://localhost:59991", httpClient)
2121

2222
// Create context
2323
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)

pkg/transparent-cache/oginy/oginy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ func Start(port int, loggingEnabled bool) error {
456456
}
457457
log.Printf("Using certificate directory: %s", certDir)
458458

459+
// Cleanup any existing certificates
460+
os.RemoveAll(filepath.Join(certDir, "*.crt"))
461+
os.RemoveAll(filepath.Join(certDir, "*.key"))
462+
459463
// Generate CA if it doesn't exist
460464
caCertPath := filepath.Join(certDir, "localCA.crt")
461465
caKeyPath := filepath.Join(certDir, "localCA.key")

test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
func main() {
1616
// Define command line flags
1717
var (
18-
derpPort = flag.Int("derp-port", 50052, "Port for DERP (Cache Twirp) service")
19-
asurPort = flag.Int("asur-port", 50053, "Port for ASUR (Azure→S3 Proxy) service")
20-
oginyPort = flag.Int("oginy-port", 50051, "Port for OGINY (TLS Reverse Proxy) service. Set to 0 to disable")
18+
derpPort = flag.Int("derp-port", 59992, "Port for DERP (Cache Twirp) service")
19+
asurPort = flag.Int("asur-port", 59993, "Port for ASUR (Azure→S3 Proxy) service")
20+
oginyPort = flag.Int("oginy-port", 59991, "Port for OGINY (TLS Reverse Proxy) service. Set to 0 to disable")
2121
backendURL = flag.String("backend-url", "http://localhost:8000", "WarpCache backend URL")
2222
authToken = flag.String("auth-token", "", "WarpCache authentication token")
2323
debug = flag.Bool("debug", true, "Enable debug mode")

0 commit comments

Comments
 (0)