Initial commit
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM denoland/deno:alpine-1.48.0
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only necessary files
|
||||
COPY deno.json .
|
||||
COPY . .
|
||||
COPY static/img/ static/img/
|
||||
|
||||
# Cache dependencies
|
||||
RUN deno cache app.ts
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Run as non-root user
|
||||
RUN adduser -D appuser && chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
# Start application
|
||||
# Note: Set SERVICE_DOMAIN environment variable to configure your domain
|
||||
# Example: docker run -e SERVICE_DOMAIN=my-ipv4-service.example.com ...
|
||||
CMD ["run", "--allow-net", "--allow-read", "src/app.ts"]
|
||||
73
README.md
Normal file
73
README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# deno-no-ipv4-here
|
||||
*Inspired by [ungleich](https://code.ungleich.ch/ungleich-public/ungleich-no-ipv4-here)*
|
||||
|
||||
A simple microservice that responds the following text to all requests
|
||||
|
||||
```
|
||||
Sorry, (this part of) domain $domain is not reachable by IPv4. Please upgrade to IPv6 and try to reach $domain again.
|
||||
```
|
||||
|
||||
Written for Deno.
|
||||
|
||||
## Configuration
|
||||
|
||||
The application uses the following environment variables:
|
||||
|
||||
- `SERVICE_DOMAIN`: The domain where this service is hosted (default: "localhost")
|
||||
- Example: `SERVICE_DOMAIN=my-ipv6-service.example.com`
|
||||
|
||||
When making requests to this service, the domain you provide in the `back_to` parameter will be compared against this value to determine if it should be treated as an external domain.
|
||||
|
||||
## Running with Deno
|
||||
|
||||
1. Install Deno: https://deno.land/manual/getting_started/installation
|
||||
2. Clone this repository:
|
||||
```bash
|
||||
git clone https://git.kyun.li/gunter/ungleich-no-ipv4-here
|
||||
cd ungleich-no-ipv4-here
|
||||
```
|
||||
3. Start the service:
|
||||
```bash
|
||||
deno run --allow-net --allow-read app.ts
|
||||
```
|
||||
4. Set the SERVICE_DOMAIN environment variable for your domain:
|
||||
```bash
|
||||
SERVICE_DOMAIN=your-domain.example.com deno run --allow-net --allow-read app.ts
|
||||
```
|
||||
|
||||
## Running with Docker
|
||||
|
||||
1. Build the Docker image:
|
||||
```bash
|
||||
docker build -t deno-no-ipv4-here .
|
||||
```
|
||||
2. Run the container with your domain configuration:
|
||||
```bash
|
||||
docker run -e SERVICE_DOMAIN=your-domain.example.com -p 8080:8080 deno-no-ipv4-here
|
||||
```
|
||||
|
||||
## Example Caddy Configuration
|
||||
|
||||
Here's a Caddyfile configuration that redirects all non-configured domains to this service:
|
||||
|
||||
```caddy
|
||||
# Caddyfile
|
||||
(your_domain) {
|
||||
# Your existing configuration for your domain
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
|
||||
# Catch-all for all other domains
|
||||
:80, :443 {
|
||||
# Redirect to the no-ipv4-here service
|
||||
redir https://no-ipv4-here.your-domain.example.com?back_to={host} permanent
|
||||
}
|
||||
```
|
||||
|
||||
This configuration:
|
||||
1. Handles requests for your configured domain normally
|
||||
2. Redirects all other domains to the no-ipv4-here service
|
||||
3. Passes the original host as the `back_to` parameter
|
||||
4. Uses a permanent redirect (HTTP 301)
|
||||
|
||||
Replace `no-ipv4-here.your-domain.example.com` with the domain where you're running this service.
|
||||
75
app.ts
Normal file
75
app.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import { Application, Router, type Context, type Next } from "jsr:@oak/oak";
|
||||
import { join } from "jsr:@std/path";
|
||||
import { Eta } from "jsr:@eta-dev/eta";
|
||||
|
||||
// Create Eta instance
|
||||
const eta = new Eta({
|
||||
views: join(Deno.cwd(), "src", "views"),
|
||||
cache: Deno.env.get("DENO_ENV") === "production",
|
||||
});
|
||||
|
||||
// Create Oak application
|
||||
const app = new Application();
|
||||
const router = new Router();
|
||||
|
||||
// Serve static files
|
||||
app.use(async (ctx: Context, next: Next) => {
|
||||
const staticPath = join(Deno.cwd(), "src", "static");
|
||||
|
||||
try {
|
||||
// Strip /static prefix from path
|
||||
const path = ctx.request.url.pathname.replace(/^\/static/, '');
|
||||
|
||||
await ctx.send({
|
||||
root: staticPath,
|
||||
path: path,
|
||||
index: "index.html",
|
||||
});
|
||||
} catch {
|
||||
await next();
|
||||
}
|
||||
});
|
||||
|
||||
// Main route handler
|
||||
router.get("/", async (ctx: Context) => {
|
||||
const params = ctx.request.url.searchParams;
|
||||
let back_to_url = params.get("back_to") || "";
|
||||
let domain = "";
|
||||
|
||||
// If no back_to parameter, check host header
|
||||
if (!back_to_url) {
|
||||
const host = ctx.request.headers.get("host") || "";
|
||||
const serviceDomain = Deno.env.get("SERVICE_DOMAIN") || "localhost";
|
||||
const domainRegex = new RegExp(`^(${serviceDomain.replace(/\./g, '\\.')}|localhost)`);
|
||||
// Exclude our own hosts
|
||||
if (host && !domainRegex.test(host)) {
|
||||
back_to_url = `http://${host}`;
|
||||
}
|
||||
}
|
||||
|
||||
// Extract domain from URL
|
||||
if (back_to_url) {
|
||||
try {
|
||||
domain = new URL(back_to_url).hostname;
|
||||
} catch {
|
||||
// Invalid URL, ignore
|
||||
}
|
||||
}
|
||||
|
||||
// Render template with context
|
||||
const html = await eta.render("index", {
|
||||
back_to_url,
|
||||
domain: domain || "This part of the Internet",
|
||||
});
|
||||
|
||||
ctx.response.body = html;
|
||||
ctx.response.type = "text/html";
|
||||
});
|
||||
|
||||
app.use(router.routes());
|
||||
app.use(router.allowedMethods());
|
||||
|
||||
// Start server
|
||||
const port = 8080;
|
||||
console.log(`Server running on http://localhost:${port}`);
|
||||
await app.listen({ port });
|
||||
10
deno.json
Normal file
10
deno.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"imports": {
|
||||
"oak": "https://deno.land/x/oak@v16.0.0/mod.ts",
|
||||
"path": "https://deno.land/std@0.224.0/path/mod.ts",
|
||||
"eta": "https://deno.land/x/eta@v3.1.0/mod.ts"
|
||||
},
|
||||
"tasks": {
|
||||
"start": "deno run --allow-net --allow-read src/app.ts"
|
||||
}
|
||||
}
|
||||
290
deno.lock
generated
Normal file
290
deno.lock
generated
Normal file
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"version": "5",
|
||||
"specifiers": {
|
||||
"jsr:@eta-dev/eta@*": "3.5.0",
|
||||
"jsr:@oak/commons@0.10": "0.10.2",
|
||||
"jsr:@oak/commons@1": "1.0.0",
|
||||
"jsr:@oak/oak@*": "17.1.5",
|
||||
"jsr:@std/assert@0.223": "0.223.0",
|
||||
"jsr:@std/assert@0.224": "0.224.0",
|
||||
"jsr:@std/assert@0.226": "0.226.0",
|
||||
"jsr:@std/assert@1": "1.0.13",
|
||||
"jsr:@std/bytes@0.223": "0.223.0",
|
||||
"jsr:@std/bytes@0.224": "0.224.0",
|
||||
"jsr:@std/bytes@1": "1.0.4",
|
||||
"jsr:@std/crypto@0.223": "0.223.0",
|
||||
"jsr:@std/crypto@0.224": "0.224.0",
|
||||
"jsr:@std/crypto@1": "1.0.5",
|
||||
"jsr:@std/encoding@0.223": "0.223.0",
|
||||
"jsr:@std/encoding@1": "1.0.8",
|
||||
"jsr:@std/encoding@1.0.0-rc.2": "1.0.0-rc.2",
|
||||
"jsr:@std/encoding@^1.0.7": "1.0.8",
|
||||
"jsr:@std/http@0.223": "0.223.0",
|
||||
"jsr:@std/http@0.224": "0.224.5",
|
||||
"jsr:@std/http@1": "1.0.13",
|
||||
"jsr:@std/io@0.223": "0.223.0",
|
||||
"jsr:@std/media-types@0.223": "0.223.0",
|
||||
"jsr:@std/media-types@0.224": "0.224.1",
|
||||
"jsr:@std/media-types@1": "1.1.0",
|
||||
"jsr:@std/path@*": "0.223.0",
|
||||
"jsr:@std/path@0.223": "0.223.0",
|
||||
"jsr:@std/path@1": "1.0.8",
|
||||
"npm:@types/node@*": "22.12.0",
|
||||
"npm:path-to-regexp@6.2.1": "6.2.1",
|
||||
"npm:path-to-regexp@^6.3.0": "6.3.0"
|
||||
},
|
||||
"jsr": {
|
||||
"@eta-dev/eta@3.5.0": {
|
||||
"integrity": "6b70827efc14c7cbf08498ac7a922ecab003641caf3852a6cb5b1b12ee58fb37"
|
||||
},
|
||||
"@oak/commons@0.10.2": {
|
||||
"integrity": "f47aebe12c3c73372ebe96250dbcd469d11f9e9df0cd89169d245bf674a347d5",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@0.226",
|
||||
"jsr:@std/bytes@0.224",
|
||||
"jsr:@std/crypto@0.224",
|
||||
"jsr:@std/http@0.224",
|
||||
"jsr:@std/media-types@0.224"
|
||||
]
|
||||
},
|
||||
"@oak/commons@1.0.0": {
|
||||
"integrity": "49805b55603c3627a9d6235c0655aa2b6222d3036b3a13ff0380c16368f607ac",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@1",
|
||||
"jsr:@std/bytes@1",
|
||||
"jsr:@std/crypto@1",
|
||||
"jsr:@std/encoding@1",
|
||||
"jsr:@std/http@1",
|
||||
"jsr:@std/media-types@1"
|
||||
]
|
||||
},
|
||||
"@oak/oak@17.1.5": {
|
||||
"integrity": "676263340dcfd069fb422b4274b4f75f7048a68e605dece6a2897ccfe669e7cc",
|
||||
"dependencies": [
|
||||
"jsr:@oak/commons@1",
|
||||
"jsr:@std/assert@1",
|
||||
"jsr:@std/bytes@1",
|
||||
"jsr:@std/http@1",
|
||||
"jsr:@std/media-types@1",
|
||||
"jsr:@std/path@1",
|
||||
"npm:path-to-regexp@^6.3.0"
|
||||
]
|
||||
},
|
||||
"@std/assert@0.223.0": {
|
||||
"integrity": "eb8d6d879d76e1cc431205bd346ed4d88dc051c6366365b1af47034b0670be24"
|
||||
},
|
||||
"@std/assert@0.224.0": {
|
||||
"integrity": "8643233ec7aec38a940a8264a6e3eed9bfa44e7a71cc6b3c8874213ff401967f"
|
||||
},
|
||||
"@std/assert@0.226.0": {
|
||||
"integrity": "0dfb5f7c7723c18cec118e080fec76ce15b4c31154b15ad2bd74822603ef75b3"
|
||||
},
|
||||
"@std/assert@1.0.13": {
|
||||
"integrity": "ae0d31e41919b12c656c742b22522c32fb26ed0cba32975cb0de2a273cb68b29"
|
||||
},
|
||||
"@std/bytes@0.223.0": {
|
||||
"integrity": "84b75052cd8680942c397c2631318772b295019098f40aac5c36cead4cba51a8"
|
||||
},
|
||||
"@std/bytes@0.224.0": {
|
||||
"integrity": "a2250e1d0eb7d1c5a426f21267ab9bdeac2447fa87a3d0d1a467d3f7a6058e49"
|
||||
},
|
||||
"@std/bytes@1.0.4": {
|
||||
"integrity": "11a0debe522707c95c7b7ef89b478c13fb1583a7cfb9a85674cd2cc2e3a28abc"
|
||||
},
|
||||
"@std/crypto@0.223.0": {
|
||||
"integrity": "1aa9555ff56b09e197ad988ea200f84bc6781fd4fd83f3a156ee44449af93000",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@0.223",
|
||||
"jsr:@std/encoding@0.223"
|
||||
]
|
||||
},
|
||||
"@std/crypto@0.224.0": {
|
||||
"integrity": "154ef3ff08ef535562ef1a718718c5b2c5fc3808f0f9100daad69e829bfcdf2d",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@0.224"
|
||||
]
|
||||
},
|
||||
"@std/crypto@1.0.5": {
|
||||
"integrity": "0dcfbb319fe0bba1bd3af904ceb4f948cde1b92979ec1614528380ed308a3b40"
|
||||
},
|
||||
"@std/encoding@0.223.0": {
|
||||
"integrity": "2b5615a75e00337ce113f34cf2f9b8c18182c751a8dcc8b1a2c2fc0e117bef00"
|
||||
},
|
||||
"@std/encoding@1.0.0-rc.2": {
|
||||
"integrity": "160d7674a20ebfbccdf610b3801fee91cf6e42d1c106dd46bbaf46e395cd35ef"
|
||||
},
|
||||
"@std/encoding@1.0.8": {
|
||||
"integrity": "a6c8f3f933ab1bed66244f435d1dc0fd23a888e07195532122ddc3d5f8f0e6b4"
|
||||
},
|
||||
"@std/http@0.223.0": {
|
||||
"integrity": "15ab8a0c5a7e9d5be017a15b01600f20f66602ceec48b378939fa24fcec522aa",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@0.223",
|
||||
"jsr:@std/encoding@0.223"
|
||||
]
|
||||
},
|
||||
"@std/http@0.224.5": {
|
||||
"integrity": "b03b5d1529f6c423badfb82f6640f9f2557b4034cd7c30655ba5bb447ff750a4",
|
||||
"dependencies": [
|
||||
"jsr:@std/encoding@1.0.0-rc.2"
|
||||
]
|
||||
},
|
||||
"@std/http@1.0.13": {
|
||||
"integrity": "d29618b982f7ae44380111f7e5b43da59b15db64101198bb5f77100d44eb1e1e",
|
||||
"dependencies": [
|
||||
"jsr:@std/encoding@^1.0.7"
|
||||
]
|
||||
},
|
||||
"@std/io@0.223.0": {
|
||||
"integrity": "2d8c3c2ab3a515619b90da2c6ff5ea7b75a94383259ef4d02116b228393f84f1",
|
||||
"dependencies": [
|
||||
"jsr:@std/bytes@0.223"
|
||||
]
|
||||
},
|
||||
"@std/media-types@0.223.0": {
|
||||
"integrity": "84684680c2eb6bc6d9369c6d6f26a49decaf2c7603ff531862dda575d9d6776e"
|
||||
},
|
||||
"@std/media-types@0.224.1": {
|
||||
"integrity": "9e69a5daed37c5b5c6d3ce4731dc191f80e67f79bed392b0957d1d03b87f11e1"
|
||||
},
|
||||
"@std/media-types@1.1.0": {
|
||||
"integrity": "c9d093f0c05c3512932b330e3cc1fe1d627b301db33a4c2c2185c02471d6eaa4"
|
||||
},
|
||||
"@std/path@0.223.0": {
|
||||
"integrity": "593963402d7e6597f5a6e620931661053572c982fc014000459edc1f93cc3989",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@0.223"
|
||||
]
|
||||
},
|
||||
"@std/path@1.0.8": {
|
||||
"integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be"
|
||||
}
|
||||
},
|
||||
"npm": {
|
||||
"@types/node@22.12.0": {
|
||||
"integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==",
|
||||
"dependencies": [
|
||||
"undici-types"
|
||||
]
|
||||
},
|
||||
"path-to-regexp@6.2.1": {
|
||||
"integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw=="
|
||||
},
|
||||
"path-to-regexp@6.3.0": {
|
||||
"integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="
|
||||
},
|
||||
"undici-types@6.20.0": {
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
||||
}
|
||||
},
|
||||
"remote": {
|
||||
"https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834",
|
||||
"https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917",
|
||||
"https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8",
|
||||
"https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2",
|
||||
"https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c",
|
||||
"https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c",
|
||||
"https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8",
|
||||
"https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b",
|
||||
"https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf",
|
||||
"https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d",
|
||||
"https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8",
|
||||
"https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3",
|
||||
"https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607",
|
||||
"https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a",
|
||||
"https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883",
|
||||
"https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0",
|
||||
"https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15",
|
||||
"https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e",
|
||||
"https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643",
|
||||
"https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36",
|
||||
"https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c",
|
||||
"https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441",
|
||||
"https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac",
|
||||
"https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069",
|
||||
"https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972",
|
||||
"https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7",
|
||||
"https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141",
|
||||
"https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a",
|
||||
"https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0",
|
||||
"https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd",
|
||||
"https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352",
|
||||
"https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f",
|
||||
"https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a",
|
||||
"https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d",
|
||||
"https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0",
|
||||
"https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4",
|
||||
"https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1",
|
||||
"https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00",
|
||||
"https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2",
|
||||
"https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1",
|
||||
"https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40",
|
||||
"https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f",
|
||||
"https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede",
|
||||
"https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9",
|
||||
"https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63",
|
||||
"https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25",
|
||||
"https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604",
|
||||
"https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91",
|
||||
"https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6",
|
||||
"https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a",
|
||||
"https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c",
|
||||
"https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf",
|
||||
"https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf",
|
||||
"https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0",
|
||||
"https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add",
|
||||
"https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d",
|
||||
"https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b",
|
||||
"https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40",
|
||||
"https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808",
|
||||
"https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660",
|
||||
"https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4",
|
||||
"https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5",
|
||||
"https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9",
|
||||
"https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef",
|
||||
"https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6",
|
||||
"https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01",
|
||||
"https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8",
|
||||
"https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a",
|
||||
"https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9",
|
||||
"https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf",
|
||||
"https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25",
|
||||
"https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604",
|
||||
"https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780",
|
||||
"https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6",
|
||||
"https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707",
|
||||
"https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7",
|
||||
"https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972",
|
||||
"https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e",
|
||||
"https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c",
|
||||
"https://deno.land/x/oak@v16.0.0/application.ts": "c6361a3c3fb3607c5dfe1800b156f07b612979dc0498c746aeca54bb9f643a92",
|
||||
"https://deno.land/x/oak@v16.0.0/body.ts": "0f8a6843720ea6cebba2132a5e4dda5a97bbd49e7fb64e96ade0b7c8009bba2d",
|
||||
"https://deno.land/x/oak@v16.0.0/context.ts": "a93a5b41dde2ceb52232ae31b3496be76e8a42ea421a73d7cffe9e640adb8dfd",
|
||||
"https://deno.land/x/oak@v16.0.0/deps.ts": "9410ef92a6e3ff7a322a0f894781f04e2cd139d5bb03e2d7c0ce4ad010e9723e",
|
||||
"https://deno.land/x/oak@v16.0.0/forwarded.ts": "97fa621071e4878ce64196055b49cdf8ee63f1bb39185c9446bfb817c209bcc9",
|
||||
"https://deno.land/x/oak@v16.0.0/http_server_bun.ts": "cb3a66c735cd0533c4c3776b37ae627ab42344c82f91dff63e3030d9656fd3a0",
|
||||
"https://deno.land/x/oak@v16.0.0/http_server_native.ts": "3bea00ebb9638203d2449fbf9a14a6b87f119bd45012f13282ececdf7b4c4242",
|
||||
"https://deno.land/x/oak@v16.0.0/http_server_native_request.ts": "a4da6f4939736e6323720db2d4b0d19ff2e83f02e52ab1eea9ae80f2c047fa56",
|
||||
"https://deno.land/x/oak@v16.0.0/http_server_node.ts": "9bb5291c15305b297fd634aa4c6b1d5054368f4b7a171d7c7c302c73eb2489ed",
|
||||
"https://deno.land/x/oak@v16.0.0/middleware.ts": "4170180fe5009d2581a0bdc995e5953b90ccb5b1c3767f3eae8a4fe238b8bd81",
|
||||
"https://deno.land/x/oak@v16.0.0/middleware/etag.ts": "310ed4ed01f2af5384ab78617c82a2bdd7f84d66539172e45ee16452846f0754",
|
||||
"https://deno.land/x/oak@v16.0.0/middleware/proxy.ts": "6e2253f88246c89c5d90678e7705b08966e7352f64a36e28fb12c7c99bbf0cc1",
|
||||
"https://deno.land/x/oak@v16.0.0/middleware/serve.ts": "efceebd70afb73bcabe0a6a8981f3d8474a2f2f30e85b46761aee49e81bd9d6a",
|
||||
"https://deno.land/x/oak@v16.0.0/mod.ts": "38e53e01e609583e843f3e2b2677de9872d23d68939ce0de85b402e7a8db01a7",
|
||||
"https://deno.land/x/oak@v16.0.0/node_shims.ts": "4db1569b2b79b73f37c4d947f4aaa50a93e266d48fe67601c8a31af17a28884d",
|
||||
"https://deno.land/x/oak@v16.0.0/request.ts": "b3d356da3f1e45f850d0b11e5637cb9d3d76fb96cb7b45ec9276bf89fa34ac08",
|
||||
"https://deno.land/x/oak@v16.0.0/response.ts": "bc47174d3d797ffc802f40fba006c16de8390e776a36f6f4a4d4f58b278bf36f",
|
||||
"https://deno.land/x/oak@v16.0.0/router.ts": "882f36a576e280b0d617cc174feca320f02deed77bdea8264444ba8b55cc0422",
|
||||
"https://deno.land/x/oak@v16.0.0/send.ts": "c05e5985b356b568ae4954a40373f93451a3f8cc9ae8706c8b8879e5e0c8c86b",
|
||||
"https://deno.land/x/oak@v16.0.0/testing.ts": "c879789ac721144c3dcad0a06f5afbe2cd94fb20afc32302992942a49a7def90",
|
||||
"https://deno.land/x/oak@v16.0.0/types.ts": "cd4ccd3e182d0cba2117cd27f560267970470ab9c0ff6556cadd73f605193be7",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/clone_state.ts": "cf8989ddd56816b36ada253ae0acdbd46cdf3d68dbe674d2b66c46640fab3500",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/consts.ts": "137c4f73479f5e98a13153b9305f06f0d85df3cf2aacad2c9f82d4c1f3a2f105",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/create_promise_with_resolvers.ts": "de99e9a998162b929a011f8873eaf0895cf4742492b3ce6f6866d39217342523",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/decode_component.ts": "d3e2c40ecdd2fdb79761c6e9ae224cf01a4643f7c5f4c1e0b69698d43025261b",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/encode_url.ts": "c0ed6b318eb9523adeebba32eb9acd059c0f94d3511b2b9e3b024722d1b3dfb8",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/resolve_path.ts": "aa39d54a003b38fee55f340a0cba3f93a7af85b8ddd5fbfb049a98fc0109b36d",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/streams.ts": "6d55543fdeddc3c9c6f512de227b9b33ff4b0ec5e320edc109f0cbf9bef8963f",
|
||||
"https://deno.land/x/oak@v16.0.0/utils/type_guards.ts": "a1b42aa4c431c4c07d3f8a45a2142020f86d5a3e1e319af94fdf2f4c6c72465f"
|
||||
}
|
||||
}
|
||||
BIN
static/img/favicon.ico
Normal file
BIN
static/img/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/img/ipv6onlyhosting-ungleich-deadend.jpg
Normal file
BIN
static/img/ipv6onlyhosting-ungleich-deadend.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
73
views/index.eta
Normal file
73
views/index.eta
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
.responsive {
|
||||
width: 100%;
|
||||
max-width: 496px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-margin {
|
||||
margin: 20px 10%;
|
||||
}
|
||||
body {
|
||||
font-family: Helvetica, sans-serif;
|
||||
font-size: 15pt;
|
||||
color: black;
|
||||
}
|
||||
.para-title{
|
||||
font-weight: 600;
|
||||
}
|
||||
footer{
|
||||
margin: 50px 0 25px;
|
||||
}
|
||||
</style>
|
||||
<title><%= it.domain ? it.domain + " is not reachable by IPv4" : "This part of the Internet is not reachable by IPv4" %></title>
|
||||
<meta name="keywords" content="IPv6, IPv4, End of IPv4, IPv6 only">
|
||||
<meta name="description" content="The end of the IPv4 Internet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<img src="/img/ipv6onlyhosting-ungleich-deadend.jpg"
|
||||
alt="ipv6onlyhosting-ungleich-deadend"
|
||||
class="responsive" width="600" height="400">
|
||||
|
||||
<div class="center content-margin">
|
||||
<p>
|
||||
You have reached the end of the IPv4 Internet.
|
||||
|
||||
<% if (it.back_to_url) { %>
|
||||
<br>
|
||||
The site <%= it.domain %> is not reachable by IPv4.
|
||||
To access
|
||||
<a href="<%= it.back_to_url %>" target="_blank"><%= it.domain %></a>,
|
||||
you need to enable IPv6 on your computer.
|
||||
<% } %>
|
||||
|
||||
<br>
|
||||
Find out
|
||||
<a href="https://ungleich.ch/en-us/cms/blog/2019/02/05/how-to-get-ipv6/">
|
||||
how to enable IPv6</a>.
|
||||
<br>
|
||||
<% /* <a href="https://redmine.ungleich.ch/projects/open-infrastructure/wiki/How_to_disable_IPv4_on_your_website">How
|
||||
to use this service</a> for your IPv6 only service. */ %>
|
||||
</p>
|
||||
</div>
|
||||
<footer class="center">
|
||||
This service is provided to you by <a href="https://git.kyun.li/gunter/deno-no-ipv4-here" target="_blank">deno-no-ipv4-here</a>.
|
||||
<i>Inspired by <a href="https://ungleich.ch" target="_blank">ungleich</a>.</i>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user