update
Some checks failed
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 1m33s
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m20s
Build GDExtension / Build GDExtension (libgurt_godot.so, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 16m9s
Build Flumi / Build Flumi (Linux, 4.4.1, ubuntu-latest, linux) (push) Failing after 2h10m11s
Build Flumi / Build Flumi (Windows Desktop, 4.4.1, windows-latest, windows) (push) Has been cancelled
Build GDExtension / Build GDExtension (gurt_godot.dll, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Some checks failed
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 1m33s
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m20s
Build GDExtension / Build GDExtension (libgurt_godot.so, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 16m9s
Build Flumi / Build Flumi (Linux, 4.4.1, ubuntu-latest, linux) (push) Failing after 2h10m11s
Build Flumi / Build Flumi (Windows Desktop, 4.4.1, windows-latest, windows) (push) Has been cancelled
Build GDExtension / Build GDExtension (gurt_godot.dll, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
This commit is contained in:
@@ -4,7 +4,7 @@ sidebar_position: 6
|
||||
|
||||
# DNS System
|
||||
|
||||
The Gurted ecosystem features a custom DNS system that enables domain resolution for the gurt:// protocol. Unlike traditional DNS, Gurted DNS is designed specifically for the decentralized web ecosystem, providing:
|
||||
The Gurted ecosystem features a custom DNS system that enables domain resolution for the lw:// protocol. Unlike traditional DNS, Gurted DNS is designed specifically for the decentralized web ecosystem, providing:
|
||||
|
||||
- Domain registration with approval workflows
|
||||
- DNS record management (A, AAAA, CNAME, TXT)
|
||||
|
||||
@@ -4,5 +4,5 @@ sidebar_position: 7
|
||||
|
||||
# Flumi (browser)
|
||||
|
||||
**Flumi** is the official browser for the Gurted ecosystem, built using the Godot game engine. It provides a complete web browsing experience for `gurt://` URLs with custom HTML/CSS rendering, Lua scripting support, and integration with the Gurted DNS system.
|
||||
**Flumi** is the official browser for the Gurted ecosystem, built using the Godot game engine. It provides a complete web browsing experience for `lw://` URLs with custom HTML/CSS rendering, Lua scripting support, and integration with the Gurted DNS system.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ async fn main() -> Result<()> {
|
||||
let client = GurtClient::new();
|
||||
|
||||
// Make a GET request
|
||||
let response = client.get("gurt://example.com/").await?;
|
||||
let response = client.get("lw://example.com/").await?;
|
||||
|
||||
println!("Status: {}", response.status_code);
|
||||
println!("Body: {}", response.text()?);
|
||||
@@ -65,7 +65,7 @@ let client = GurtClient::with_config(config);
|
||||
### GET Requests
|
||||
|
||||
```rust
|
||||
let response = client.get("gurt://api.example.com/users").await?;
|
||||
let response = client.get("lw://api.example.com/users").await?;
|
||||
|
||||
if response.is_success() {
|
||||
println!("Success: {}", response.text()?);
|
||||
@@ -78,7 +78,7 @@ if response.is_success() {
|
||||
|
||||
#### Text Data
|
||||
```rust
|
||||
let response = client.post("gurt://api.example.com/submit", "Hello, GURT!").await?;
|
||||
let response = client.post("lw://api.example.com/submit", "Hello, GURT!").await?;
|
||||
```
|
||||
|
||||
#### JSON Data
|
||||
@@ -90,30 +90,30 @@ let data = json!({
|
||||
"email": "john@example.com"
|
||||
});
|
||||
|
||||
let response = client.post_json("gurt://api.example.com/users", &data).await?;
|
||||
let response = client.post_json("lw://api.example.com/users", &data).await?;
|
||||
```
|
||||
|
||||
### PUT Requests
|
||||
|
||||
```rust
|
||||
// Text data
|
||||
let response = client.put("gurt://api.example.com/resource/123", "Updated content").await?;
|
||||
let response = client.put("lw://api.example.com/resource/123", "Updated content").await?;
|
||||
|
||||
// JSON data
|
||||
let update_data = json!({"status": "completed"});
|
||||
let response = client.put_json("gurt://api.example.com/tasks/456", &update_data).await?;
|
||||
let response = client.put_json("lw://api.example.com/tasks/456", &update_data).await?;
|
||||
```
|
||||
|
||||
### DELETE Requests
|
||||
|
||||
```rust
|
||||
let response = client.delete("gurt://api.example.com/users/123").await?;
|
||||
let response = client.delete("lw://api.example.com/users/123").await?;
|
||||
```
|
||||
|
||||
### HEAD Requests
|
||||
|
||||
```rust
|
||||
let response = client.head("gurt://api.example.com/large-file").await?;
|
||||
let response = client.head("lw://api.example.com/large-file").await?;
|
||||
|
||||
// Check headers without downloading body
|
||||
let content_length = response.headers.get("content-length");
|
||||
@@ -122,7 +122,7 @@ let content_length = response.headers.get("content-length");
|
||||
### OPTIONS Requests
|
||||
|
||||
```rust
|
||||
let response = client.options("gurt://api.example.com/endpoint").await?;
|
||||
let response = client.options("lw://api.example.com/endpoint").await?;
|
||||
|
||||
// Check allowed methods
|
||||
let allowed_methods = response.headers.get("allow");
|
||||
@@ -132,7 +132,7 @@ let allowed_methods = response.headers.get("allow");
|
||||
|
||||
```rust
|
||||
let patch_data = json!({"name": "Updated Name"});
|
||||
let response = client.patch_json("gurt://api.example.com/users/123", &patch_data).await?;
|
||||
let response = client.patch_json("lw://api.example.com/users/123", &patch_data).await?;
|
||||
```
|
||||
|
||||
## Response Handling
|
||||
@@ -152,7 +152,7 @@ pub struct GurtResponse {
|
||||
### Accessing Response Data
|
||||
|
||||
```rust
|
||||
let response = client.get("gurt://api.example.com/data").await?;
|
||||
let response = client.get("lw://api.example.com/data").await?;
|
||||
|
||||
// Status information
|
||||
println!("Status Code: {}", response.status_code);
|
||||
@@ -201,14 +201,14 @@ All of this happens transparently when you call methods like `get()`, `post()`,
|
||||
|
||||
## URL Parsing
|
||||
|
||||
The client automatically parses `gurt://` URLs:
|
||||
The client automatically parses `lw://` URLs:
|
||||
|
||||
```rust
|
||||
// These are all valid GURT URLs:
|
||||
client.get("gurt://example.com/").await?; // Port 4878 (default)
|
||||
client.get("gurt://example.com:8080/api").await?; // Custom port
|
||||
client.get("gurt://192.168.1.100/test").await?; // IP address
|
||||
client.get("gurt://localhost:4878/dev").await?; // Localhost
|
||||
client.get("lw://example.com/").await?; // Port 4878 (default)
|
||||
client.get("lw://example.com:8080/api").await?; // Custom port
|
||||
client.get("lw://192.168.1.100/test").await?; // IP address
|
||||
client.get("lw://localhost:4878/dev").await?; // Localhost
|
||||
```
|
||||
|
||||
### URL Components
|
||||
@@ -225,7 +225,7 @@ The client extracts:
|
||||
```rust
|
||||
use gurtlib::GurtError;
|
||||
|
||||
match client.get("gurt://invalid-url").await {
|
||||
match client.get("lw://invalid-url").await {
|
||||
Ok(response) => {
|
||||
// Handle successful response
|
||||
}
|
||||
@@ -332,7 +332,7 @@ impl ApiClient {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let api = ApiClient::new("gurt://api.example.com".to_string());
|
||||
let api = ApiClient::new("lw://api.example.com".to_string());
|
||||
|
||||
// Create a user
|
||||
let new_user = CreateUser {
|
||||
|
||||
@@ -4,7 +4,7 @@ sidebar_position: 2
|
||||
|
||||
# GURT Protocol
|
||||
|
||||
**GURT** (version 1.0.0) is a TCP-based application protocol designed as an HTTP-like alternative with built-in TLS 1.3 encryption. It serves as the foundation for the Gurted ecosystem, enabling secure communication between clients and servers using the `gurt://` URL scheme.
|
||||
**GURT** (version 1.0.0) is a TCP-based application protocol designed as an HTTP-like alternative with built-in TLS 1.3 encryption. It serves as the foundation for the Gurted ecosystem, enabling secure communication between clients and servers using the `lw://` URL scheme.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -21,12 +21,12 @@ GURT provides a familiar HTTP-like syntax while offering security through mandat
|
||||
|
||||
## URL Scheme
|
||||
|
||||
GURT uses the `gurt://` URL scheme:
|
||||
GURT uses the `lw://` URL scheme:
|
||||
|
||||
```
|
||||
gurt://example.com/path
|
||||
gurt://192.168.1.100:4878/api/data
|
||||
gurt://localhost:4878/hello
|
||||
lw://example.com/path
|
||||
lw://192.168.1.100:4878/api/data
|
||||
lw://localhost:4878/hello
|
||||
```
|
||||
|
||||
The protocol automatically defaults to port 4878.
|
||||
@@ -244,13 +244,13 @@ GURT integrates with Gurted's custom DNS system:
|
||||
|
||||
### Direct IP Access
|
||||
```
|
||||
gurt://192.168.1.100:4878/
|
||||
gurt://localhost:4878/api
|
||||
lw://192.168.1.100:4878/
|
||||
lw://localhost:4878/api
|
||||
```
|
||||
|
||||
### Domain Resolution
|
||||
```
|
||||
gurt://example.real/ # Resolves via Gurted DNS
|
||||
lw://example.real/ # Resolves via Gurted DNS
|
||||
```
|
||||
|
||||
The Gurted DNS server resolves domains in the format `name.tld` to IP addresses, enabling human-readable domain names for GURT services. This is done automatically by your GURT browser and is documented in the [DNS System documentation](./dns-system.md).
|
||||
|
||||
@@ -38,7 +38,7 @@ async fn main() -> Result<()> {
|
||||
Ok(GurtResponse::ok().with_json_body(&users))
|
||||
});
|
||||
|
||||
println!("GURT server starting on gurt://127.0.0.1:4878");
|
||||
println!("GURT server starting on lw://127.0.0.1:4878");
|
||||
server.listen("127.0.0.1:4878").await
|
||||
}
|
||||
```
|
||||
@@ -462,7 +462,7 @@ mod tests {
|
||||
|
||||
// Test with client
|
||||
let client = GurtClient::new();
|
||||
let response = client.get("gurt://127.0.0.1:9999/test").await.unwrap();
|
||||
let response = client.get("lw://127.0.0.1:9999/test").await.unwrap();
|
||||
|
||||
assert_eq!(response.status_code, 200);
|
||||
assert_eq!(response.text().unwrap(), "test response");
|
||||
|
||||
@@ -75,7 +75,7 @@ line breaks
|
||||
Links can point to external URLs (which open in the user's default browser) or GURT protocol links:
|
||||
```html
|
||||
<a href="https://example.com">External link</a>
|
||||
<a href="gurt://internal.site">GURT protocol link</a>
|
||||
<a href="lw://internal.site">GURT protocol link</a>
|
||||
```
|
||||
|
||||
### Line Breaks
|
||||
@@ -317,7 +317,7 @@ Network image loading with sizing controls:
|
||||
|
||||
```html
|
||||
<img src="https://example.com/image.jpg" style="max-w-24 max-h-24 rounded" />
|
||||
<img src="gurt://local.site/image.png" style="w-32 h-32" />
|
||||
<img src="lw://local.site/image.png" style="w-32 h-32" />
|
||||
```
|
||||
|
||||
## Advanced Features
|
||||
|
||||
@@ -5,7 +5,7 @@ sidebar_position: 1
|
||||
# Introduction
|
||||
|
||||
**Gurted** is a project introducing a new web ecosystem, featuring:
|
||||
- the **gurt:// protocol**
|
||||
- the **lw:// protocol**
|
||||
- a custom search engine
|
||||
- a custom browser - **Flumi**
|
||||
- a custom **DNS** (Domain Name System)
|
||||
@@ -22,7 +22,7 @@ Learn more about the GURT protocol: [Protocol Specification](./gurt-protocol.md)
|
||||
Get started by **exploring Gurted sites** or **try creating your first GURT page**.
|
||||
|
||||
To get started, download:
|
||||
- [Flumi](https://gurted.com/download/), the official browser for `gurt://`
|
||||
- [Flumi](https://gurted.com/download/), the official browser for `lw://`
|
||||
- A *text editor* of choice, we recommend [Visual Studio Code](https://code.visualstudio.com/download)
|
||||
|
||||
## Components
|
||||
@@ -34,7 +34,7 @@ Gurted consists of three main components:
|
||||
```html
|
||||
<head>
|
||||
<title>Yo Gurt</title>
|
||||
<icon src="gurt://example.real/icon.png">
|
||||
<icon src="lw://example.real/icon.png">
|
||||
|
||||
<style>...</style>
|
||||
</head>
|
||||
|
||||
@@ -12,7 +12,7 @@ audio:stop() -- Stop and reset
|
||||
audio.currentTime = 30.0 -- Seek to 30 seconds
|
||||
audio.volume = 0.8 -- Set volume (0.0 - 1.0)
|
||||
audio.loop = true -- Enable looping
|
||||
audio.src = 'gurt://new-audio.mp3' -- Change source
|
||||
audio.src = 'lw://new-audio.mp3' -- Change source
|
||||
|
||||
local duration = audio.duration
|
||||
local currentPos = audio.currentTime
|
||||
|
||||
@@ -14,7 +14,7 @@ download_id = gurt.download(url filename)
|
||||
|
||||
### Parameters
|
||||
|
||||
- **url** (string): The URL to download from. Supports HTTP, HTTPS, and gurt:// protocols.
|
||||
- **url** (string): The URL to download from. Supports HTTP, HTTPS, and lw:// protocols.
|
||||
- **filename** (string, optional): The filename to save as. If not provided, the filename will be extracted from the URL or default to "download".
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -92,7 +92,7 @@ gurt.location.reload()
|
||||
Navigates to a new URL.
|
||||
|
||||
```lua
|
||||
gurt.location.goto('gurt://example.com/page')
|
||||
gurt.location.goto('lw://example.com/page')
|
||||
gurt.location.goto('https://external-site.com')
|
||||
```
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ end
|
||||
|
||||
**Supported Methods:** `GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `PATCH`
|
||||
|
||||
**Relative URLs** are automatically resolved to the current domain with `gurt://` protocol.
|
||||
**Relative URLs** are automatically resolved to the current domain with `lw://` protocol.
|
||||
|
||||
## WebSocket API
|
||||
|
||||
@@ -89,8 +89,8 @@ trace.log(params) -- name%3DJohn%20Doe%26age%3D30
|
||||
|
||||
-- Building query strings
|
||||
local searchTerm = 'cats & dogs'
|
||||
local url = 'gurt://search.com/api?q=' .. urlEncode(searchTerm)
|
||||
trace.log(url) -- gurt://search.com/api?q=cats%20%26%20dogs
|
||||
local url = 'lw://search.com/api?q=' .. urlEncode(searchTerm)
|
||||
trace.log(url) -- lw://search.com/api?q=cats%20%26%20dogs
|
||||
```
|
||||
|
||||
### urlDecode(string)
|
||||
|
||||
Reference in New Issue
Block a user