# Copyright (c) 2017-2024 Cloudflare, Inc. # Licensed under the Apache 2.0 license found in the LICENSE file or at: # https://opensource.org/licenses/Apache-2.0 using Workerd = import "/workerd/workerd.capnp"; const config :Workerd.Config = ( services = [ ( name = "main", worker = ( modules = [ (name = "worker.js", esModule = embed "http-socket-test.js") ], compatibilityFlags = ["nodejs_compat", "experimental"], bindings = [ (name = "HTTP_SOCKET_SERVER_PORT", fromEnvironment = "HTTP_SOCKET_SERVER_PORT"), (name = "SOCKET_PARTIALLY_WRITTEN", fromEnvironment = "SOCKET_PARTIALLY_WRITTEN"), (name = "FLUSH_HELLO_SOCKET", fromEnvironment = "FLUSH_HELLO_SOCKET"), (name = "STARTTLS_SOCKET", fromEnvironment = "STARTTLS_SOCKET"), ], ) ), ( name = "internet", network = ( allow = ["private"], tlsOptions = ( trustedCertificates = [ embed "starttls-server.pem", ], ), ) ), ], );