Port WebOne 0.19.0 to Go
A Go translation of WebOne (github.com/atauenis/webone, commit e940b43), the HTTP 1.x proxy that lets old browsers use today's web: config loader with sets of edits and .NET regular expressions, the HTTP/1.0-1.1 server with keep-alive, HTTPS fetching and patching, code pages, the CONNECT proxy (MITM, pass-through, non-HTTP tunnels), the CA and site certificates (MD5/SHA-1 signing included), internal and error pages, Web Archive fallback, converters, web FTP client and online video. WebOne's licence, configuration files and html pages are kept. Go-only options: SslCaDirectory signs with the D-Modem BBS's proxy sub-CA (or its root), SslTrustOwnCA, and DnsServer. README lists the differences: no SSL 2.0/3.0 in Go's TLS, and the upstream bugs fixed on purpose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRRH4kntyPfrY1bFWC3
No files matched your search
@@ -0,0 +1,18 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: go vet ./...
|
||||
- run: go test -race ./...
|
||||
- run: go build -o webone ./cmd/webone
|
||||
@@ -0,0 +1,5 @@
|
||||
/webone
|
||||
/webone.exe
|
||||
ssl.crt
|
||||
ssl.key
|
||||
*.log
|
||||
@@ -0,0 +1,29 @@
|
||||
License agreement for WebOne Proxy Server
|
||||
=========================================
|
||||
|
||||
Copyright (C) 2019+, WebOne Development Team. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the WebOne nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
* All users (clients) of service(s) based on this software must be notified
|
||||
about traffic changes and possible security problems.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1 +1,223 @@
|
||||
# WebOne-go
|
||||
# WebOne-go
|
||||
|
||||
A Go port of [WebOne](https://github.com/atauenis/webone), the HTTP 1.x proxy
|
||||
that makes old web browsers, media players and messengers usable again on
|
||||
today's web. Old browsers ask the proxy for `http://` pages. The proxy fetches
|
||||
them over modern HTTPS, patches what old browsers choke on, converts the text
|
||||
to a code page they can read, and sends it back as HTTP/1.0 or 1.1.
|
||||
|
||||
D-Modem uses it so that callers dialling into the BBS can browse the web from
|
||||
period machines. The proxy can sign its HTTPS certificates with the BBS's own
|
||||
CA, so callers only have to install one certificate.
|
||||
|
||||
## Where this comes from
|
||||
|
||||
WebOne is written in C# by Alexander Tauenis and the WebOne Development Team,
|
||||
under the BSD-style licence in [LICENSE.txt](LICENSE.txt). This repository is
|
||||
a derivative work. It follows WebOne **0.19.0** at upstream commit
|
||||
[`e940b43`](https://github.com/atauenis/webone/commit/e940b4304779f1f1a58d1e9df9500bdb6461e41e)
|
||||
(22 October 2026). The Go code is a new translation of that C#, file by file:
|
||||
`HttpTransit.cs` became `internal/proxy/transit.go`, `ConfigFileLoader.cs`
|
||||
became `internal/config/loader.go`, and so on. The files below are WebOne's
|
||||
own and are kept as upstream has them, except where noted:
|
||||
|
||||
* `LICENSE.txt`, unchanged. Its last clause applies to this port too: **all
|
||||
users of a service based on this software must be told that their traffic
|
||||
is changed, and about the security problems that brings.**
|
||||
* `webone.conf`, `codepage.conf`, `escargot.conf`: WebOne's configuration
|
||||
and sets of edits. `webone.conf` has the Go port's options added as
|
||||
comments, and `SslProtocols` no longer lists SSL 2.0 and 3.0 (see below).
|
||||
* `html/` (internal and error pages, icons) and `logo.webp`.
|
||||
* `webone.service`, `webone.logrotate`. The service file drops the .NET-only
|
||||
`OPENSSL_CONF` line and gains a note about running as the BBS's user.
|
||||
|
||||
The [WebOne wiki](https://github.com/atauenis/webone/wiki) documents the
|
||||
configuration, and that documentation holds for this port. The differences
|
||||
are listed below.
|
||||
|
||||
## Build and run
|
||||
|
||||
Go 1.26 or later:
|
||||
|
||||
```sh
|
||||
go build -o webone ./cmd/webone
|
||||
./webone # finds webone.conf (here, next to the program, ~/.config/webone, /etc)
|
||||
./webone 8080 # on another port
|
||||
./webone -cfg /etc/webone.conf -l /var/log/webone.log
|
||||
./webone --help
|
||||
```
|
||||
|
||||
The `html/` directory goes next to the program, or wherever `ContentDirectory=`
|
||||
points. Then set the old browser's HTTP proxy to `host:8080`, or its automatic
|
||||
configuration URL to `http://host:8080/auto.pac`. Browsers with no proxy
|
||||
setting can use `http://host:8080/http://example.com/`. Open
|
||||
`http://host:8080/` to see the proxy's status page.
|
||||
|
||||
What works:
|
||||
|
||||
* All three ways of asking: as a proxy, as a web server for its own pages,
|
||||
and the `http://proxy/http://site/` alternate mode. CERN-style FTP is
|
||||
supported too.
|
||||
* HTTP/1.0 and HTTP/1.1 clients, with keep-alive. The reply uses chunked
|
||||
transfer only for HTTP/1.1 clients.
|
||||
* Fetching over HTTPS (and HTTP/2), with HTTP→HTTPS upgrades,
|
||||
`[ForceHttps]`, and redirect loop ("carousel") handling.
|
||||
* Sets of edits (`[Edit:...]`): every condition and action WebOne has, .NET
|
||||
regular expressions included (through
|
||||
[regexp2](https://github.com/dlclark/regexp2)).
|
||||
* Code pages: `OutputEncoding`, `[Translit]`, and `codepage.conf`. Windows,
|
||||
DOS, Mac, ISO and KOI8 code pages are included, as are UTF-16 and the CJK
|
||||
ones.
|
||||
* The HTTPS proxy (CONNECT): man-in-the-middle with a per-site
|
||||
certificate, pass-through (`[ConnectPassThrough]`), non-HTTP tunnels
|
||||
(`[NonHttpSslServers]`, `[NonHttpConnectRedirect]`) and `[NonHttpSslDecrypt]`.
|
||||
* The CA: made on first start, or `--rebuild-ca`. MD5, SHA-1 or SHA-2
|
||||
signatures. External generators (`SslSiteCerts`, `SslSiteCertGenerator`).
|
||||
`/!ca` and `/weboneca.pem` serve the CA certificate.
|
||||
* Internal pages: status, `/!codepages`, PAC/WPAD, `/!ftp/` (the web FTP
|
||||
client), `/!convert/` and on-the-fly converters (ImageMagick and others),
|
||||
`/!webvideo/` and `/!player/` (yt-dlp and ffmpeg), `/!redirect/`,
|
||||
`/!clear/`, and the `html/` pages and error pages.
|
||||
* The Web Archive fallback, proxy logins, IP and URL lists, traffic dumps
|
||||
(`--dump`), ActiveX codebase emulation, and log files.
|
||||
|
||||
## Using the D-Modem BBS's CA
|
||||
|
||||
The BBS keeps a CA (see the BBS's *Certificates* wiki page). Callers install
|
||||
its root, `ca/ca.crt`, from `ca/install-ca.zip`. Give the proxy a sub-CA of
|
||||
its own:
|
||||
|
||||
```sh
|
||||
bbs ca subca proxy # makes ca/proxy-ca.crt and ca/proxy-ca.key
|
||||
```
|
||||
|
||||
and point the proxy at the directory:
|
||||
|
||||
```ini
|
||||
[SecureProxy]
|
||||
SslEnable=yes
|
||||
SslCaDirectory=/var/lib/bbs/ca ; the BBS's ca/ directory, beside its database
|
||||
;SslHashAlgorithm=SHA1 ; leave out to sign as the sub-CA is signed
|
||||
|
||||
[Server]
|
||||
DnsServer=127.0.0.1:53 ; optional: look sites up through the BBS's DNS
|
||||
```
|
||||
|
||||
With `SslCaDirectory` set:
|
||||
|
||||
* The proxy signs each site's certificate with `proxy-ca.key`, and sends
|
||||
`proxy-ca.crt` after it. Callers who installed the BBS root trust both.
|
||||
* `/!ca` hands out the root `ca.crt`, which is the one callers install.
|
||||
* Unless `SslHashAlgorithm` is set, certificates are signed with the
|
||||
sub-CA's own algorithm. A CA made with `bbs ca init -sha1` therefore gives
|
||||
SHA-1 certificates, which Windows 95 to XP SP2 need.
|
||||
* Site certificates last at most 397 days. They are cached, and each subject
|
||||
keeps one serial number.
|
||||
* The BBS's files are never changed, and `--rebuild-ca` refuses to touch them.
|
||||
A directory with no `proxy-ca` falls back to signing with the root's
|
||||
`ca.key`, and logs a warning. Making the sub-CA is the better way.
|
||||
|
||||
**Permissions.** The BBS keeps `ca/` at mode 0700 and the keys at 0600, owned
|
||||
by the user in its `[general]` section. Either run the proxy as that user
|
||||
(see `webone.service`), or give the proxy's user read access to
|
||||
`ca/proxy-ca.key`, `ca/proxy-ca.crt` and `ca/ca.crt` (for example, through a
|
||||
shared group), plus search access to `ca/`. The proxy says plainly when it
|
||||
cannot read them.
|
||||
|
||||
`SslTrustOwnCA=yes` makes the proxy also trust that CA when it fetches pages
|
||||
itself. Use it for sites the BBS serves under its own CA.
|
||||
|
||||
## Differences from WebOne
|
||||
|
||||
### Not available in Go
|
||||
|
||||
* **No SSL 2.0 or 3.0, and no SSLv2-format hello.** Go's TLS starts at
|
||||
TLS 1.0. Browsers that only speak SSL (Netscape 1 to 4, IE 2 to 5 with its
|
||||
defaults) cannot use the CONNECT/MITM mode. They work fine through the
|
||||
plain HTTP proxy, which is WebOne's main mode anyway: the browser asks for
|
||||
`http://`, and the proxy does the HTTPS. `Ssl2` and `Ssl3` in
|
||||
`SslProtocols` are ignored with a warning. Clients that need TLS 1.0 with
|
||||
old ciphers (IE 6 to 8 on XP) do work: all of Go's suites, the weak ones
|
||||
included, are offered unless `SslCipherSuites` says otherwise. Supporting
|
||||
SSL 3.0 is a possible follow-up.
|
||||
* `UseMsHttpApi` (Windows' HTTP.sys server) does not exist here. It is
|
||||
ignored with a warning, and the proxy always uses its own server, as
|
||||
WebOne does by default.
|
||||
* `MultipleHttp2Connections` is accepted, but Go decides this itself.
|
||||
|
||||
### Fixed on purpose
|
||||
|
||||
These are bugs or rough edges in WebOne 0.19.0 that the port does not copy:
|
||||
|
||||
* Edit sets' `OnContentType` masks are tested against the response's content
|
||||
type in the right order.
|
||||
* `%UrlNoDomain%`, `%UrlNoQuery%`, `%UrlNoPort%`, `%UrlHttp%` and
|
||||
`%UrlHttps%` no longer produce `//` or `??`.
|
||||
* Several `Set-Cookie` headers reach the client as separate lines, instead
|
||||
of joined with commas.
|
||||
* `Connection: Keep-Alive` is sent only to clients that keep connections:
|
||||
ones that ask for it, and HTTP/1.1 ones unless they say `close`. Other
|
||||
clients get `Connection: Close`. WebOne promises keep-alive to everyone and
|
||||
then closes.
|
||||
* Replies to `HEAD`, and `204`/`304` replies, have no body or chunk
|
||||
terminator.
|
||||
* Request bodies sent chunked are accepted (WebOne has this stubbed out).
|
||||
* `$Variable` names are replaced longest first, so `$UA-Firefox` is not cut
|
||||
short by `$UA`.
|
||||
* `OpenForLocalIPs` decides what is "local" from the address (loopback,
|
||||
private, link-local) instead of pinging the client with a TTL of 1.
|
||||
* Error pages escape what they pass to `html/Err-*.htm`, so a URL with `&` in
|
||||
it is shown whole.
|
||||
* The web FTP client reads multi-line FTP replies properly instead of timing
|
||||
them. It accepts `125` as well as `150`, and falls back to the control
|
||||
connection's host when a server behind NAT gives a private address for
|
||||
passive mode.
|
||||
* Code pages round-trip: bytes a code page leaves undefined come back as the
|
||||
same bytes, as .NET does.
|
||||
* `/!webvideo/` with `dump-json` returns yt-dlp's output, where WebOne
|
||||
returned its error stream.
|
||||
|
||||
### Tightened
|
||||
|
||||
* `/!convert/?src=` opens only files in the proxy's own directory (no paths).
|
||||
WebOne opens any path it is given.
|
||||
* `/!webvideo/` does not take yt-dlp options that read or write files or run
|
||||
programs (`exec`, `output`, `batch-file`, `config-locations`, `cookies`,
|
||||
`netrc-cmd` and similar) from the URL. They still work from
|
||||
`[WebVideoOptions]` in the configuration.
|
||||
* Converters that hang are stopped when the client goes away. WebOne instead
|
||||
measures CPU use with Windows performance counters.
|
||||
|
||||
### Added (Go port only)
|
||||
|
||||
| Option | Section | What it does |
|
||||
|---|---|---|
|
||||
| `SslCaDirectory` | `[SecureProxy]` | sign with the D-Modem BBS's CA (above) |
|
||||
| `SslTrustOwnCA` | `[SecureProxy]` | trust the proxy's CA for fetched sites too |
|
||||
| `DnsServer` | `[Server]` | look sites up through this DNS server (`host` or `host:port`) |
|
||||
|
||||
The version is reported as `0.19.0-go`.
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
cmd/webone the program: command line, CA loading, start-up
|
||||
internal/config webone.conf: loading, [Include:], variables, sets of edits
|
||||
internal/proxy the server, request handling, CONNECT, internal pages, FTP, video
|
||||
internal/certs the CA, site certificates (MD5/SHA-1 signing), the BBS's CA
|
||||
internal/textenc code pages
|
||||
internal/rx .NET-style regular expressions, cached
|
||||
internal/logx the log, in WebOne's format
|
||||
```
|
||||
|
||||
`go test ./...` covers configuration parsing, edit sets, code pages, the
|
||||
certificates (including a BBS-style sub-CA chain), and the proxy end to end:
|
||||
HTTP/1.0 with edits and a code page, HTTPS fetching, alternate mode,
|
||||
keep-alive with chunked replies, internal pages, CONNECT with MITM, and
|
||||
pass-through.
|
||||
|
||||
## Licence
|
||||
|
||||
This port is under the same terms as WebOne: see [LICENSE.txt](LICENSE.txt).
|
||||
Copyright (C) 2019+, WebOne Development Team. The Go port is copyright the
|
||||
D-Modem project contributors.
|
||||
@@ -0,0 +1,326 @@
|
||||
// Command webone is WebOne, the HTTP proxy that lets old web browsers
|
||||
// reach today's web, ported to Go.
|
||||
//
|
||||
// webone [config file] [port] [-cfg file] [-l logfile|no] [-p port]
|
||||
// [-h hostname] [-t tempdir] [-a user:pass] [--dump [file]]
|
||||
// [--rebuild-ca] [--daemon] [--help]
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/D-Modem/webone-go/internal/certs"
|
||||
"github.com/D-Modem/webone-go/internal/config"
|
||||
"github.com/D-Modem/webone-go/internal/logx"
|
||||
"github.com/D-Modem/webone-go/internal/proxy"
|
||||
)
|
||||
|
||||
type arg struct{ name, value string }
|
||||
|
||||
const unnamed = "--wo-short"
|
||||
|
||||
// parseArgs splits the command line as WebOne does: "-name value" pairs,
|
||||
// and values without a name (a port or a configuration file).
|
||||
func parseArgs(args []string) []arg {
|
||||
var out []arg
|
||||
name, value, lastWasValue := unnamed, "", false
|
||||
for _, a := range args {
|
||||
if strings.HasPrefix(a, "-") || (runtime.GOOS == "windows" && strings.HasPrefix(a, "/")) {
|
||||
out = append(out, arg{name, value})
|
||||
name, value, lastWasValue = a, "", false
|
||||
continue
|
||||
}
|
||||
if lastWasValue {
|
||||
out = append(out, arg{name, value})
|
||||
}
|
||||
value, lastWasValue = a, true
|
||||
}
|
||||
return append(out, arg{name, value})
|
||||
}
|
||||
|
||||
func main() {
|
||||
os.Exit(run(os.Args[1:]))
|
||||
}
|
||||
|
||||
func run(argv []string) int {
|
||||
version := proxy.Version
|
||||
system := runtime.GOOS + " " + runtime.GOARCH + " (Go " + runtime.Version() + ")"
|
||||
fmt.Printf("WebOne HTTP Proxy Server %s\nhttps://github.com/D-Modem/webone-go (a Go port of https://github.com/atauenis/webone)\n\n\n", version)
|
||||
|
||||
args := parseArgs(argv)
|
||||
var customConfig, logFile string
|
||||
logSet, logOff, rebuildCA, daemon := false, false, false, false
|
||||
port := -1
|
||||
for _, a := range args {
|
||||
switch a.name {
|
||||
case "/cfg", "-cfg", "-config", "--config":
|
||||
customConfig = a.value
|
||||
case "/l", "-l", "--log":
|
||||
logSet = true
|
||||
if a.value == "" || a.value == "no" {
|
||||
logOff = true
|
||||
} else {
|
||||
logFile = a.value
|
||||
}
|
||||
case "/t", "-t", "--tmp", "--temp", "/p", "-p", "--port", "--http-port", "--https-port", "--ftp-port",
|
||||
"/h", "-h", "--host", "--hostname", "/a", "-a", "--proxy-authenticate",
|
||||
"--dump", "--dump-headers", "--dump-requests":
|
||||
// after the configuration is loaded
|
||||
case "--rebuild-ca":
|
||||
rebuildCA = true
|
||||
case "--daemon":
|
||||
daemon = true
|
||||
case "--help", "-?", "/?":
|
||||
fmt.Println("Usage: webone [config file] [port] [options]")
|
||||
fmt.Println()
|
||||
fmt.Println(" -cfg FILE configuration file (default: webone.conf, searched for)")
|
||||
fmt.Println(" -l FILE | -l no log file, or no log file")
|
||||
fmt.Println(" -p PORT port to listen on")
|
||||
fmt.Println(" -h NAME host name of the proxy as clients reach it")
|
||||
fmt.Println(" -t DIR directory for temporary files")
|
||||
fmt.Println(" -a USER:PASS require this proxy login (replaces the configured ones)")
|
||||
fmt.Printf(" --dump [FILE] save all HTTP traffic (default dump-%%Url%%.log)\n")
|
||||
fmt.Println(" --rebuild-ca make a new CA certificate, then exit")
|
||||
fmt.Println(" --daemon print nothing; log to the log file only")
|
||||
fmt.Println()
|
||||
fmt.Println("All of WebOne's options are described in its wiki: https://github.com/atauenis/webone/wiki")
|
||||
fmt.Println()
|
||||
fmt.Println("Initially made by Alexander Tauenis. Moscow, Russian Federation.")
|
||||
return 0
|
||||
case unnamed:
|
||||
if strings.TrimSpace(a.value) == "" {
|
||||
break
|
||||
}
|
||||
if n, err := strconv.Atoi(a.value); err == nil {
|
||||
port = n
|
||||
fmt.Printf("Using custom port %d.\n", port)
|
||||
break
|
||||
}
|
||||
customConfig = a.value
|
||||
default:
|
||||
fmt.Printf("Unknown command line argument: %s.\n", a.name)
|
||||
}
|
||||
}
|
||||
|
||||
cfg := config.New()
|
||||
cfg.Vars.Set("WOVer", version)
|
||||
cfg.Vars.Set("WOSystem", system)
|
||||
if customConfig != "" {
|
||||
customConfig = cfg.Expand(customConfig, nil)
|
||||
}
|
||||
if logFile != "" {
|
||||
logx.OpenLogFile(cfg.Expand(logFile, nil), false, version, argv)
|
||||
}
|
||||
|
||||
cfgFile, err := config.FindConfigFile(customConfig)
|
||||
if err == nil {
|
||||
if err = cfg.LoadFile(cfgFile); err == nil {
|
||||
err = cfg.Process()
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
fmt.Printf("Error while loading configuration: %v\n", err)
|
||||
logx.Server(false, "WebOne has been exited due to lack of configuration.")
|
||||
return 1
|
||||
}
|
||||
if port > 0 {
|
||||
cfg.Port = port
|
||||
}
|
||||
if !logSet && cfg.LogFile != "" {
|
||||
logx.OpenLogFile(cfg.Expand(cfg.LogFile, nil), cfg.LogFileAppend, version, argv)
|
||||
}
|
||||
|
||||
// options that override the configuration
|
||||
for _, a := range args {
|
||||
switch a.name {
|
||||
case "/t", "-t", "--tmp", "--temp":
|
||||
cfg.TemporaryDirectory = cfg.Expand(a.value, nil)
|
||||
case "/p", "-p", "--port", "--http-port", "--https-port", "--ftp-port":
|
||||
n, err := strconv.Atoi(a.value)
|
||||
if err != nil {
|
||||
fmt.Printf("Warning: Wrong argument '%s %s': %v.\n", a.name, a.value, err)
|
||||
continue
|
||||
}
|
||||
cfg.Port = n
|
||||
case "/h", "-h", "--host", "--hostname":
|
||||
cfg.DefaultHostName = a.value
|
||||
case "/a", "-a", "--proxy-authenticate":
|
||||
cfg.Authenticate = []string{a.value}
|
||||
case "--dump", "--dump-headers", "--dump-requests":
|
||||
file := "dump-%Url%.log"
|
||||
if a.value != "" {
|
||||
file = a.value
|
||||
}
|
||||
logx.Server(true, "Will save all HTTP traffic to: %s.", file)
|
||||
sec, _ := config.ParseSection("[Edit]", "[command line]")
|
||||
opt, _ := config.ParseOption("AddDumping="+file, "[command line]")
|
||||
sec.Options = append(sec.Options, opt)
|
||||
if set, err := config.NewEditSet(sec, cfg); err == nil {
|
||||
cfg.EditRules = append(cfg.EditRules, set)
|
||||
}
|
||||
}
|
||||
}
|
||||
cfg.SetProxyVars()
|
||||
|
||||
if logOff || (!logSet && cfg.LogFile == "") {
|
||||
logx.OpenLogFile("", false, version, argv)
|
||||
}
|
||||
if daemon {
|
||||
if !logx.Enabled() {
|
||||
fmt.Println("Error: log file is not available, please fix the problem. Exiting.")
|
||||
return 1
|
||||
}
|
||||
fmt.Println("The proxy runs in daemon mode. See all messages in the log file.")
|
||||
logx.Daemon = true
|
||||
}
|
||||
|
||||
pacDefault := cfg.PAC == ""
|
||||
pac := config.DefaultPACHeader + config.DefaultPACHttp
|
||||
protocols := "HTTP 1.1"
|
||||
|
||||
var ca, root *certs.CA
|
||||
if cfg.SslEnable {
|
||||
ca, root, err = loadCA(cfg, rebuildCA)
|
||||
if rebuildCA {
|
||||
if err != nil {
|
||||
logx.Server(true, "Unable to create CA Certificate: %v.", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
if err != nil {
|
||||
logx.Server(true, "%v.", err)
|
||||
cfg.SslEnable = false
|
||||
} else {
|
||||
protocols += ", HTTPS 1.1"
|
||||
pac += config.DefaultPACHttps
|
||||
}
|
||||
if cfg.SslSiteCertGenerator != "" && cfg.SslSiteCerts == "" {
|
||||
logx.Server(true, "Warning: `SslSiteCertGenerator` is set but `SslSiteCerts` is not. Will use internal certificate generator.")
|
||||
cfg.SslSiteCertGenerator = ""
|
||||
}
|
||||
}
|
||||
protocols += ", CERN-compatible"
|
||||
pac += config.DefaultPACFtp + config.DefaultPACFooter
|
||||
if pacDefault {
|
||||
cfg.PAC = pac
|
||||
}
|
||||
logx.Server(false, "Configured to http://%s:%d/, %s", cfg.DefaultHostName, cfg.Port, protocols)
|
||||
|
||||
srv, err := proxy.New(cfg, ca, root)
|
||||
if err != nil {
|
||||
logx.Server(true, "Server initialize failed: %v", err)
|
||||
return 1
|
||||
}
|
||||
|
||||
sig := make(chan os.Signal, 1)
|
||||
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-sig
|
||||
srv.Stop()
|
||||
}()
|
||||
|
||||
addr := net.JoinHostPort("", strconv.Itoa(cfg.Port))
|
||||
if cfg.IP != nil {
|
||||
addr = net.JoinHostPort(cfg.IP.String(), strconv.Itoa(cfg.Port))
|
||||
}
|
||||
ln, err := net.Listen("tcp", addr)
|
||||
if err != nil {
|
||||
logx.Server(true, "Cannot start server: %v", err)
|
||||
if errors.Is(err, syscall.EACCES) && runtime.GOOS != "windows" {
|
||||
fmt.Println()
|
||||
fmt.Println(`You need to use "sudo webone" or use Port greater than 1024.`)
|
||||
}
|
||||
logx.Close()
|
||||
return 1
|
||||
}
|
||||
logx.Server(true, "Listening for HTTP 1.x on port %d.", cfg.Port)
|
||||
if err := srv.Serve(ln); err != nil {
|
||||
logx.Server(true, "Server stopped: %v", err)
|
||||
logx.Close()
|
||||
return 1
|
||||
}
|
||||
logx.Server(false, "WebOne has been exited.")
|
||||
logx.Close()
|
||||
return 0
|
||||
}
|
||||
|
||||
// loadCA is the CA that signs site certificates and the root clients
|
||||
// install: the D-Modem BBS's (SslCaDirectory), or WebOne's own, made when
|
||||
// missing (or always with --rebuild-ca).
|
||||
func loadCA(cfg *config.Config, rebuild bool) (*certs.CA, *certs.CA, error) {
|
||||
if cfg.SslCaDirectory != "" {
|
||||
if rebuild {
|
||||
return nil, nil, fmt.Errorf("the CA in %s belongs to the BBS (bbs ca); it is not rebuilt here", cfg.SslCaDirectory)
|
||||
}
|
||||
ca, root, err := certs.BBSCA(cfg.SslCaDirectory)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("Unable to load CA Certificate: %v", err)
|
||||
}
|
||||
if !cfg.SslHashAlgorithmSet {
|
||||
// sign as the CA above does: a SHA-1 root is for clients that
|
||||
// know no better
|
||||
cfg.SslHashAlgorithm = certs.HashOf(ca.Cert)
|
||||
}
|
||||
if ca == root {
|
||||
logx.Server(true, "Using as SSL Certificate Authority: %s (the BBS root CA itself; better give the proxy a sub-CA of its own with \"bbs ca subca proxy\").", cfg.SslCaDirectory)
|
||||
} else {
|
||||
logx.Server(false, "Using as SSL Certificate Authority: %s, sub-CA \"%s\" of \"%s\".",
|
||||
cfg.SslCaDirectory, ca.Cert.Subject.CommonName, root.Cert.Subject.CommonName)
|
||||
}
|
||||
checkValidity(cfg, ca)
|
||||
return ca, root, nil
|
||||
}
|
||||
|
||||
const minPEM = 52 // header and footer only
|
||||
have := false
|
||||
if st, err := os.Stat(cfg.SslCertificate); err == nil && st.Size() > minPEM {
|
||||
if st, err := os.Stat(cfg.SslPrivateKey); err == nil && st.Size() > minPEM {
|
||||
have = true
|
||||
}
|
||||
}
|
||||
if have && !rebuild {
|
||||
logx.Server(false, "Using as SSL Certificate Authority: %s, %s.", cfg.SslCertificate, cfg.SslPrivateKey)
|
||||
} else {
|
||||
if rebuild {
|
||||
fmt.Println()
|
||||
logx.Server(true, "CA Certificate will be new, so import it to browser(s) after build succeeds.")
|
||||
}
|
||||
logx.Server(true, "Creating root SSL Certificate & Private Key for CA...")
|
||||
if err := certs.CreateCA(cfg.SslCertificate, cfg.SslPrivateKey, cfg.SslRootSubject, cfg.SslHashAlgorithm,
|
||||
cfg.SslRootValidAfter, cfg.SslRootValidBefore); err != nil {
|
||||
return nil, nil, fmt.Errorf("Unable to create CA Certificate: %v", err)
|
||||
}
|
||||
logx.Server(true, "CA Certificate: %s; Key: %s.", cfg.SslCertificate, cfg.SslPrivateKey)
|
||||
}
|
||||
ca, err := certs.LoadCA(cfg.SslCertificate, cfg.SslPrivateKey)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("Unable to load CA Certificate: %v", err)
|
||||
}
|
||||
if rebuild {
|
||||
logx.Server(true, "The new certificate is called \"%s\".", ca.Cert.Subject.CommonName)
|
||||
logx.Server(true, "WebOne will now exit.")
|
||||
return ca, ca, nil
|
||||
}
|
||||
checkValidity(cfg, ca)
|
||||
return ca, ca, nil
|
||||
}
|
||||
|
||||
func checkValidity(cfg *config.Config, ca *certs.CA) {
|
||||
now := time.Now()
|
||||
if ca.Cert.NotAfter.Before(now) || ca.Cert.NotBefore.After(now) {
|
||||
logx.Server(true, "Warning! CA Certificate is out of date: %s-%s, now %s.", ca.Cert.NotBefore, ca.Cert.NotAfter, now)
|
||||
}
|
||||
if ca.Cert.NotAfter.Before(now.AddDate(0, 0, cfg.SslCertValidAfterNow)) || ca.Cert.NotBefore.After(now.AddDate(0, 0, cfg.SslCertValidBeforeNow)) {
|
||||
logx.Server(true, "Warning! CA Certificate is too fresh or expires too soon. Check configuration.")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
; Automatic output encoding select
|
||||
; You may edit this file if experience problems with non-English content:
|
||||
; https://github.com/atauenis/webone/wiki/Troubleshooting-language-support
|
||||
|
||||
; Mosaic, Netscape 0-3, IE 1-3, Arachne - Windows ANSI
|
||||
[Edit]
|
||||
OnHeader=User-Agent: NCSA_Mosaic
|
||||
OnHeader=User-Agent: Mozilla/[0123].*Win
|
||||
OnHeader=User-Agent: xChaos_Arachne/
|
||||
AddOutputEncoding=Windows
|
||||
|
||||
; Netscape 0-3 - OS/2 (prefers DOS code pages)
|
||||
[Edit]
|
||||
OnHeader=User-Agent: Mozilla/[0123].*OS/2
|
||||
AddOutputEncoding=DOS
|
||||
|
||||
; IBM WebExplorer - OS/2 (prefers ISO code pages)
|
||||
[Edit]
|
||||
OnHeader=User-Agent: IBM WebExplorer
|
||||
AddOutputEncoding=ISO-8859
|
||||
|
||||
; Netscape 0-3, IE 1-3 - classic Apple MacOS
|
||||
[Edit]
|
||||
OnHeader=User-Agent: Mozilla/[0123].*Mac
|
||||
AddOutputEncoding=Apple
|
||||
|
||||
; DosLynx - DOS OEM
|
||||
[Edit]
|
||||
OnHeader=User-Agent: .*DOS
|
||||
OnHeader=User-Agent: .*Dos
|
||||
AddOutputEncoding=DOS
|
||||
; uncomment line below to enable alphabet transliteration
|
||||
;AddTranslit=yes
|
||||
|
||||
|
||||
; Alphabet transliteration table
|
||||
; The following example is from Russian to Latin (English letters).
|
||||
; Any other alphabet can be used here too. Just write it in same syntax.
|
||||
; Works only if there is an "AddTranslit=yes" in any active edit set.
|
||||
[Translit]
|
||||
а=a
|
||||
б=b
|
||||
в=v
|
||||
г=g
|
||||
ґ=gg
|
||||
д=d
|
||||
е=e
|
||||
ё=yo
|
||||
є=ye
|
||||
ж=zh
|
||||
з=z
|
||||
и=i
|
||||
й=j
|
||||
ї=yi
|
||||
к=k
|
||||
л=l
|
||||
м=m
|
||||
н=n
|
||||
о=o
|
||||
п=p
|
||||
р=r
|
||||
с=s
|
||||
т=t
|
||||
у=u
|
||||
ў=w
|
||||
ф=f
|
||||
х=h
|
||||
ц=c
|
||||
ч=ch
|
||||
ш=sh
|
||||
щ=sch
|
||||
ъ=_
|
||||
ь='
|
||||
ы=y
|
||||
э=e
|
||||
ю=yu
|
||||
я=ya
|
||||
А=A
|
||||
Б=B
|
||||
В=V
|
||||
Г=G
|
||||
Ґ=GG
|
||||
Д=D
|
||||
Е=E
|
||||
Ё=YO
|
||||
Є=YE
|
||||
Ж=ZH
|
||||
З=Z
|
||||
И=I
|
||||
Й=J
|
||||
Ї=YI
|
||||
К=K
|
||||
Л=L
|
||||
М=M
|
||||
Н=N
|
||||
О=O
|
||||
П=P
|
||||
Р=R
|
||||
С=S
|
||||
Т=T
|
||||
У=U
|
||||
Ў=W
|
||||
Ф=F
|
||||
Х=H
|
||||
Ц=C
|
||||
Ч=CH
|
||||
Ш=SH
|
||||
Щ=SCH
|
||||
Ъ=~
|
||||
Ь='
|
||||
Ы=Y
|
||||
Э=E
|
||||
Ю=YU
|
||||
Я=YA
|
||||
@@ -0,0 +1,153 @@
|
||||
; Windows Live Messenger - Escargot gateway configuration.
|
||||
; Don't forget to import WebOne Root Certificate in Windows registry.
|
||||
|
||||
; Login
|
||||
[Edit:^http://messenger.hotmail.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; Gateway
|
||||
[Edit:^http://gateway.messenger.hotmail.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 4.7-7.0 Login
|
||||
[Edit:^http://nexus.passport.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
AddResponseHeader=PassportURLs: DALogin=https://ds.escargot.nina.chat/login,DAReg=http://%Proxy%/msnreg.htm,Properties=https://account.escargot.chat/,Privacy=https://escargot.chat/legal/privacy/
|
||||
|
||||
; MSN 4.7 Login, step 2
|
||||
[Edit:http://login.live.com/login2.srf]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/login
|
||||
|
||||
; MSN 7.5 Login
|
||||
[Edit:^http://loginnet.passport.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 8 Login
|
||||
[Edit:^http://login.live.com/(.*)]
|
||||
IgnoreUrl=login2.srf
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN login fix
|
||||
[Edit:^http://ds.escargot.nina.chat/loginDALogin=https://ds.escargot.nina.chat/login]
|
||||
AddInternalRedirect=https://ds.escargot.nina.chat/login
|
||||
|
||||
; PocketMSN 5 Login
|
||||
[Edit:^http://[a-zA-Z0-9\.]*.mobile.msn.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; PocketWLM 10 Login
|
||||
[Edit:^http://[a-zA-Z0-9\.]*.mobile.live.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 6+ configuration
|
||||
[Edit:^http://config.messenger.msn.com/(.*)]
|
||||
AddInternalRedirect=https://conf.escargot.chat/$1
|
||||
|
||||
; MSN 8+ contacts
|
||||
[Edit:^http://byrdr.omega.contacts.msn.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; Offline messaging
|
||||
[Edit:^http://ows.messenger.msn.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
[Edit:^http://rsi.hotmail.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 8+ Windows Live Space
|
||||
[Edit:^http://tkrdr.storage.msn.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 9+ What's New service
|
||||
[Edit:^http://sup.live.com/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
|
||||
; MSN 7 (old Escargot patch)
|
||||
[Edit:http://m1.escargot.chat/login]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/login
|
||||
|
||||
; Login (application bug)
|
||||
[Edit:^http://255.255.255.255/(.*)]
|
||||
AddInternalRedirect=https://msnmsgr.escargot.chat/$1
|
||||
; used if HKCU\Software\Microsoft\MessengerService\Server = "messenger.hotmail.com;255.255.255.255"
|
||||
|
||||
; HTML content:
|
||||
; .NET Service Status
|
||||
[Edit:^http://status.messenger.msn.com/(.*)]
|
||||
AddInternalRedirect=http://web.archive.org/web/20090212104204id_/http://status.messenger.msn.com/$1
|
||||
|
||||
; Connection troubleshooter
|
||||
[Edit:^http://g.msn.com/5meen_us/140]
|
||||
AddRedirect=http://web.archive.org/web/20070704092740if_/http://messenger.msn.com/ct/
|
||||
|
||||
; What's new in Messenger
|
||||
[Edit:^http://g.msn.com/5meen_us/153]
|
||||
AddRedirect=https://web.archive.org/web/20060411191031if_/http://www.imagine-msn.com/messenger/runonce/mosaic.aspx?locale=en
|
||||
|
||||
; Avatar gallery
|
||||
[Edit:^http://g.msn.com/5meen_us/117]
|
||||
AddRedirect=https://web.archive.org/web/20040130070134if_/http://messenger.msn.com/resource/cTiles.aspx?mkt=-
|
||||
|
||||
; Help
|
||||
[Edit:^http://g.msn.com/5meen_us/107]
|
||||
AddRedirect=https://web.archive.org/web/20110601234816/http://help.live.com/help.aspx?project=a&market=en-us
|
||||
|
||||
; Privacy
|
||||
[Edit:^http://g.msn.com/5meen_us/112]
|
||||
AddRedirect=https://web.archive.org/web/20060423153451if_/http://privacy.microsoft.com/en-us/default.aspx
|
||||
|
||||
; Send Feedback
|
||||
[Edit:^http://g.msn.com/5meen_us/150]
|
||||
AddRedirect=https://web.archive.org/web/20061022190527if_/http://feedback.live.com/eform.aspx?productkey=wlmessenger
|
||||
|
||||
; MSN Home Page
|
||||
[Edit:^http://g.msn.com/5meen_us/103]
|
||||
AddRedirect=https://escargot.chat/
|
||||
|
||||
; Service Status
|
||||
[Edit:^http://g.msn.com/5meen_us/109]
|
||||
AddRedirect=https://escargot.chat/stats/
|
||||
|
||||
; MSN Users Directory
|
||||
[Edit:^http://g.msn.com/5meen_us/125]
|
||||
AddRedirect=https://escargot.chat/contacts/
|
||||
|
||||
; Windows XP .NET Passport Sign up wizard
|
||||
[Edit:^http://register.passport.com/defaultwiz.asp]
|
||||
AddRedirect=http://%Proxy%/msnreg.htm
|
||||
|
||||
; Windows XP .NET Passport Sign up wizard (WL)
|
||||
[Edit:^https://login.live.com/err.srf]
|
||||
AddRedirect=http://%Proxy%/msnreg.htm
|
||||
|
||||
; Windows XP .NET Passport Edit profile
|
||||
[Edit:^http://memberservices.passport.com/ppsecure/MSRV_EditProfile.asp]
|
||||
AddRedirect=https://escargot.chat/account/
|
||||
|
||||
; Windows XP .NET Passport Edit profile (WL)
|
||||
[Edit:^http://account.live.com/EditProf.aspx]
|
||||
AddRedirect=https://escargot.chat/account/
|
||||
|
||||
; Windows XP .NET Passport Privacy policy
|
||||
[Edit:^http://www.passport.com/consumer/privacypolicy.asp]
|
||||
AddRedirect=https://escargot.chat/legal/privacy/
|
||||
|
||||
; Windows XP .NET Passport Privacy policy (WL)
|
||||
[Edit:^http://login.live.com/gls.srf\?urlID=MSNPrivacyStatement]
|
||||
AddRedirect=https://escargot.chat/legal/privacy/
|
||||
|
||||
; Windows XP .NET Passport Help
|
||||
[Edit:^http://memberservices.passport.com/UI/MSRV_UI_Help.asp]
|
||||
AddRedirect=https://escargot.chat/legal/rules/
|
||||
|
||||
; Windows XP .NET Passport Help (WL)
|
||||
[Edit:^http://account.live.com/.*dc=PPRDR_Help]
|
||||
AddRedirect=https://escargot.chat/legal/rules/
|
||||
|
||||
; Sign Up for a new .NET Passport
|
||||
[Edit:^http://g.msn.com/5meen_us/105]
|
||||
AddRedirect=https://escargot.chat/register/
|
||||
|
||||
|
||||
; Docs:
|
||||
; https://wiki.nina.chat/wiki/Protocols/MSNP/URLs_used_by_MSN
|
||||
; https://gitlab.com/escargot-chat/server/-/wikis/urls-used-by-msn
|
||||
@@ -0,0 +1,8 @@
|
||||
module github.com/D-Modem/webone-go
|
||||
|
||||
go 1.26.0
|
||||
|
||||
require (
|
||||
github.com/dlclark/regexp2 v1.12.0
|
||||
golang.org/x/text v0.44.0
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
|
||||
github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
|
||||
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<title>WebOne: connection error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>The connection was refused</h1>
|
||||
<p><big>%ErrorMessage%.</big></p>
|
||||
<ul><li>The site could be temporarily unavailable or too busy. Try again in a few moments.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
<li>If your proxy server or network is protected by a firewall, make sure that WebOne is permitted to access the Web.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<title>WebOne: connection error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>The connection has been reset</h1>
|
||||
<p><big>%ErrorMessage%.</big></p>
|
||||
<ul><li>The site could be temporarily unavailable or too busy. Try again in a few moments.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
<li>If your proxy server or network is protected by a firewall, make sure that WebOne is permitted to access the Web.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<title>WebOne: connection error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>Cannot find the server</h1>
|
||||
<p><big>%ErrorMessage%.</big></p>
|
||||
<ul><li>Check the address for typing errors such as <strong>ww</strong>.example.com instead of <strong>www</strong>.example.com.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
<li>If your proxy server or network is protected by a firewall, make sure that WebOne is permitted to access the Web.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<title>WebOne: Decompression failed</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>Invalid data has been recieved</h1>
|
||||
<p><big>Cannot decode HTTP data.</big></p>+
|
||||
<ul>Remote server may use unsupported HTTP compression algorithm.
|
||||
<li>Try to set AllowHttpCompression=false option in configuration file to skip HTTP decompression, which may cause this error due to .NET bug.</li>
|
||||
<li>Installing a newer version of .NET Runtime also <i>may</i> solve the problem.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<title>Non-whitelisted client</title>
|
||||
<meta charset="utf-8"/>
|
||||
<style type='text/css'>
|
||||
h1, h2, h3, h4 {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: Cambria, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 4em auto;
|
||||
max-width: 52em;
|
||||
min-width: 13em;
|
||||
padding: 3em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: square;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<h1>Goodbye, %IP%</h1>
|
||||
<p><big>You are not in the list of allowed clients. Contact proxy server's administrator to add your IP address in it.</big></p>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>Loop requests are probhited</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<P><BIG>Seems that you have looped connection.</BIG></P>
|
||||
<P>This may be caused by incorrect WebOne or operating system configuration.</P>
|
||||
<P>Set <B>UpperProxy</B> to <B>no</B> in configuration file to enable WebOne direct connection to the Internet.</P>
|
||||
<P>Make sure that only the client browser is accessing Internet via proxy, and the proxy server have a true direct connection. Note that WebOne is using system settings to access Internet. Some browsers (Internet Explorer, Safari, all Chromium-based) are using same settings as the OS where they are started.</P>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<title>HTTPS Is Not Supported</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<P><BIG>Sorry, Secure traffic transfer is disabled on proxy server.</BIG></P>
|
||||
<P>Set <B>SslEnable</B> to <B>yes</B> in configuration file to allow work with HTTPS & SSL. Also make sure that CA files are accessible.</P>
|
||||
<P>Or set the proxy usage only for HTTP protocol in your Web-browser settings. Any HTTPS websites can be accessed via plain HTTP protocol via the proxy.</P>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<title>WebOne: Operation timeout</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>The connection has timed out</h1>
|
||||
<p><big>The request was canceled due to Timeout of 100 seconds elapsing.</big></p>
|
||||
<ul><li>The site could be temporarily unavailable or too busy. Try again in a few moments.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>Internet Archive sometimes became busy. Be patient, wait a some time.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
<li>If your proxy server or network is protected by a firewall, make sure that WebOne is permitted to access the Web.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<title>WebOne: connection error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>The connection has timed out</h1>
|
||||
<p><big>%ErrorMessage%.</big></p>
|
||||
<ul><li>The site could be temporarily unavailable or too busy. Try again in a few moments.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>If you are unable to load any pages, check your proxy server's network connection.</li>
|
||||
<li>If your proxy server or network is protected by a firewall, make sure that WebOne is permitted to access the Web.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<title>WebOne: connection error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>Secure connection could not be established</h1>
|
||||
<p><big>%ErrorMessage%.</big></p>
|
||||
<ul><li>The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.</li>
|
||||
<li>Make sure that the OS on the proxy server have all updates installed.</li>
|
||||
<li>Check date and time on the proxy server.</li>
|
||||
<li>Verify that the proxy server operating system have proper support for TLS/SSL version and chiphers used on the site.</li>
|
||||
<li>Try to use an <a href="http://web.archive.org/web/2/%URL%">archived copy</a> of the web site.</li>
|
||||
<li>To disable this security check, set <q><b>ValidateCertificates=no</b></q> in proxy configuration file. But this will make the proxy less secure, do this at your own risk.</li>
|
||||
</ul>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>%Scheme% Is Not Supported</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>Unsupported protocol</h1>
|
||||
<p>You're attempted to request content from <i>%URL%</i>. The protocol specified in the URL is not supported by this proxy server.</p>
|
||||
<p>Consider connect directly to the server, bypassing the proxy. This error message may appear if your Web browser settings have enabled <b>"Use proxy for all protocols"</b> option. Uncheck it and set only for protocols supported by WebOne. List of them can be found in project's Wiki.</p>
|
||||
<p>This message also may appear if you have not installed an appication that designed to handle %Scheme% addresses.</p>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<title>Blacklisted URL</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><big>Access to this web page is disallowed by proxy settings.</big></p>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<title>URL out of white list</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><big>Proxy server administrator has been limited this proxy server to work with several web sites only.</big></p>
|
||||
</ul>
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>Web Archive Error: 403</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><b>This URL has been excluded from the Wayback Machine.</b></p>
|
||||
<p>This page is not present in Web Archive.</p>
|
||||
<small><i>You see this message because ShortenArchiveErrors option is enabled.</i></small>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>Web Archive Error: 404</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><b>The Wayback Machine has not archived that URL.</b></p>
|
||||
<p>Try to slightly change the URL.</p>
|
||||
<small><i>You see this message because <code>ShortenArchiveErrors</code> option is enabled.</i></small>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>Web Archive Error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><b>The Wayback Machine cannot give this page.</b></p>
|
||||
<p>This is reason: %ErrorMessage%.</p>
|
||||
<small><i>You see this message because ShortenArchiveErrors option is enabled.</i></small>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>Web Archive - bad gateway</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><h1>"Bad gateway"</h1></p>
|
||||
<p>There are problems in Internet Archive Wayback Machine (it returned a HTTP 502 status code) or the link is broken.</p>
|
||||
<small><i>You see this message because ShortenArchiveErrors option is enabled.</i></small>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<title>Web Archive is unavailable</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><h1>Internet Archive services are temporarily offline.</h1></p>
|
||||
<p>The Wayback Machine is not currently available. Please check <a href="http://twitter.com/internetarchive/">Twitter feed</a> for the latest information.</p>
|
||||
<p>We apologize for the inconvenience.</p>
|
||||
<small><i>You see this message because ShortenArchiveErrors option is enabled.</i></small>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>WebOne: Web Archive error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><b>Cannot load this page</b></p>
|
||||
<p>The requested server or page is not found and a Web Archive error occured.</b></p>
|
||||
<p>%ErrorMessage%.</p>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>WebOne: Web Archive retrieve error</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<p><b>Cannot load this page from Web Archive</b></p>
|
||||
<p>The requested page is found only at Web Archive, but cannot be delivered from it.</b></p>
|
||||
<p>%ErrorMessage%.</p>
|
||||
<br>URL: %URL%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<title>%Title%</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="http://%ServerName%/webone.css" rel="stylesheet" />
|
||||
<body>
|
||||
<h1>%Header%</h1>
|
||||
%Content%
|
||||
<hr>WebOne Proxy Server %WOVer% <br>on %WOSystem%
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 918 B |
|
After Width: | Height: | Size: 908 B |
|
After Width: | Height: | Size: 906 B |
|
After Width: | Height: | Size: 884 B |
|
After Width: | Height: | Size: 960 B |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 932 B |
|
After Width: | Height: | Size: 988 B |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 935 B |
|
After Width: | Height: | Size: 954 B |
|
After Width: | Height: | Size: 944 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 901 B |
|
After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 907 B |
|
After Width: | Height: | Size: 940 B |
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 924 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 1016 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 902 B |
|
After Width: | Height: | Size: 932 B |
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 914 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 969 B |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 927 B |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 964 B |
|
After Width: | Height: | Size: 1014 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 888 B |
|
After Width: | Height: | Size: 986 B |
|
After Width: | Height: | Size: 986 B |
|
After Width: | Height: | Size: 889 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 1004 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 900 B |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 997 B |
|
After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 995 B |
|
After Width: | Height: | Size: 995 B |
|
After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 946 B |