Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/aien-translate
# aien-translate
aien-dev/aien-translate
Brought by drakestapleton
Unfinished: not checked yet
There is no published receipt of a rebuild from its source yet. What a receipt is
Get this repository
Git over HTTPS
`git clone --no-checkout https://interplane.io/projects/aien-translate/repo.git aien-translate && git -C aien-translate checkout --detach cfcd35fbd15071675b61d3514f8d6744f6f8543d`
Source archive of `cfcd35fbd15071675b61d3514f8d6744f6f8543d`
Download ZIP · tar.gz
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
README.md
# aien-translate
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português · Русский
Translate your website into 31 languages with your own AI model. No API key, no cloud service, and your visitors' text never leaves your server.
aien-translate is a translation server for translate.js . It translates with AIEN's own inference runtime. It also works with any server that offers the same OpenAI-style chat API.
## Translate your website
1. Start the server on loopback. You need Rust and a running model server (AIEN's `aien-serve-http`, or any OpenAI-style chat server). Obtain the model server owner's approval before using a shared engine.
```
git clone https://github.com/aien-dev/aien-translate
cd aien-translate
cargo build --release
./target/release/aien-translate --engine http://127.0.0.1:18091
```
The server refuses non-loopback `--listen` addresses. For a local-only test, the default loopback listener needs no token. For a public site, create a private, randomly generated single-line token file (at least 32 bytes; owner-readable only), then start with `--auth-token-file /private/path/token`. Publish only a same-origin HTTPS reverse-proxy route to this loopback service. The proxy must authenticate/authorize visitors, reject cross-site requests (check `Origin` or Fetch Metadata and use CSRF protection for cookie-authenticated users), rate-limit by its verified client identity (not client-supplied forwarding headers), cap request size, reject excess work without queueing, strip client `Authorization` headers, and set the backend `Authorization: Bearer ` header itself. Restrict direct access to the listener to the proxy account. Do not embed the token in JavaScript or expose this service directly: the backend sends no CORS allow-origin header, and CORS was never authentication. If your public site permits anonymous visitors, the proxy must still enforce per-visitor quotas and abuse controls before it forwards requests.
2. Add translate.js to your page, behind the same-origin proxy. Download `translate.js` from its repository and host it with your site. Then add these lines just before `