Skip to content

Commit ffeb01b

Browse files
MDA2AVclaude
andcommitted
Add Actix, Ntex, Bun, H2O, NetCoreServer, Sisk, and Watson servers
- Actix (Rust): actix-web 4 with default_service catch-all - Ntex (Rust): ntex 2 with tokio runtime and default_service - Bun (JavaScript): built-in Bun.serve with fetch handler - H2O (C): compiled from source, YAML config serving static file - NetCoreServer (C#): raw HTTP session/server subclass pattern - Sisk (C#): Sisk.HttpServer 1.6.1 with AnyPath route - Watson (C#): WatsonWebserver 6.5.5 with default route handler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a6aae55 commit ffeb01b

27 files changed

Lines changed: 279 additions & 0 deletions

Http11Probe.slnx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<Project Path="src/Servers/EmbedIOServer/EmbedIOServer.csproj" />
99
<Project Path="src/Servers/GenHttpServer/GenHttpServer.csproj" />
1010
<Project Path="src/Servers/GlyphServer/GlyphServer.csproj" />
11+
<Project Path="src/Servers/NetCoreServerFramework/NetCoreServerFramework.csproj" />
1112
<Project Path="src/Servers/SimpleWServer/SimpleWServer.csproj" />
13+
<Project Path="src/Servers/SiskServer/SiskServer.csproj" />
14+
<Project Path="src/Servers/WatsonServer/WatsonServer.csproj" />
1215
</Folder>
1316
</Solution>

src/Servers/ActixServer/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "actix-server"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
actix-web = "4"

src/Servers/ActixServer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM rust:1-slim AS build
2+
WORKDIR /src
3+
4+
# Cache dependencies with dummy main
5+
COPY src/Servers/ActixServer/Cargo.toml .
6+
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src target/release/.fingerprint/actix-server-*
7+
8+
COPY src/Servers/ActixServer/src/ src/
9+
RUN cargo build --release
10+
11+
FROM debian:bookworm-slim
12+
COPY --from=build /src/target/release/actix-server /usr/local/bin/
13+
ENTRYPOINT ["actix-server", "8080"]

src/Servers/ActixServer/probe.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name": "Actix", "language": "Rust"}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
use actix_web::{web, App, HttpServer, HttpResponse};
2+
3+
async fn ok() -> HttpResponse {
4+
HttpResponse::Ok()
5+
.content_type("text/plain")
6+
.body("OK")
7+
}
8+
9+
#[actix_web::main]
10+
async fn main() -> std::io::Result<()> {
11+
let port: u16 = std::env::args()
12+
.nth(1)
13+
.and_then(|s| s.parse().ok())
14+
.unwrap_or(8080);
15+
16+
HttpServer::new(|| {
17+
App::new().default_service(web::to(ok))
18+
})
19+
.bind(("127.0.0.1", port))?
20+
.run()
21+
.await
22+
}

src/Servers/BunServer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM oven/bun:1-slim
2+
WORKDIR /app
3+
COPY src/Servers/BunServer/server.ts .
4+
ENTRYPOINT ["bun", "run", "server.ts", "8080"]

src/Servers/BunServer/probe.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name": "Bun", "language": "JavaScript"}

src/Servers/BunServer/server.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const port = parseInt(Bun.argv[2] || "8080", 10);
2+
3+
Bun.serve({
4+
port,
5+
hostname: "127.0.0.1",
6+
fetch() {
7+
return new Response("OK");
8+
},
9+
});
10+
11+
console.log(`Bun listening on 127.0.0.1:${port}`);

src/Servers/H2OServer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:24.04 AS build
2+
RUN apt-get update && apt-get install -y cmake gcc g++ pkg-config libssl-dev zlib1g-dev git && rm -rf /var/lib/apt/lists/*
3+
RUN git clone --recurse-submodules --depth 1 https://github.com/h2o/h2o.git /src/h2o
4+
WORKDIR /src/h2o/build
5+
RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && make -j$(nproc) && make install
6+
7+
FROM ubuntu:24.04
8+
RUN apt-get update && apt-get install -y libssl3t64 && rm -rf /var/lib/apt/lists/*
9+
COPY --from=build /usr/local/bin/h2o /usr/local/bin/
10+
COPY --from=build /usr/local/share/h2o/ /usr/local/share/h2o/
11+
COPY src/Servers/H2OServer/h2o.conf /etc/h2o/h2o.conf
12+
RUN mkdir -p /var/www && echo "OK" > /var/www/index.html
13+
ENTRYPOINT ["h2o", "-c", "/etc/h2o/h2o.conf"]

src/Servers/H2OServer/h2o.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
listen: 8080
2+
hosts:
3+
default:
4+
paths:
5+
/:
6+
file.dir: /var/www

0 commit comments

Comments
 (0)