rename app

This commit is contained in:
2026-08-31 15:36:36 +08:00
parent 78eb5c773c
commit 4e80a081e9
30 changed files with 1593 additions and 449 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ async fn main() -> std::io::Result<()> {
.merge(network::routes())
.fallback((StatusCode::NOT_FOUND, "not found"));
println!("wyd-server listening on http://{bind_addr}");
println!("friendolls-server listening on http://{bind_addr}");
axum::serve(listener, app).await
}
+2 -2
View File
@@ -5,7 +5,7 @@ use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use tokio::sync::mpsc;
use uuid::Uuid;
use wyd_common::{
use friendolls_common::{
InteractionContent, InteractionDeliveryStatus, MAX_IMAGE_DIMENSION,
MAX_INTERACTION_PAYLOAD_BYTES, ServerMessage, interaction_bytes,
};
@@ -102,7 +102,7 @@ mod tests {
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use ed25519_dalek::{Signer, SigningKey};
use image::{Rgb, RgbImage};
use wyd_common::{MAX_TEXT_CHARS, Profile};
use friendolls_common::{MAX_TEXT_CHARS, Profile};
use super::*;
use crate::network::Client;
+4 -4
View File
@@ -10,10 +10,10 @@ use axum::routing::get;
use base64::Engine;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use ed25519_dalek::{Signature, Verifier, VerifyingKey};
use friendolls_common::{ClientMessage, Profile, ServerMessage, message_bytes, register_bytes};
use futures_util::{SinkExt, StreamExt};
use tokio::sync::{Mutex, mpsc};
use uuid::Uuid;
use wyd_common::{ClientMessage, Profile, ServerMessage, message_bytes, register_bytes};
mod interactions;
mod presence;
@@ -50,7 +50,7 @@ async fn connected(mut socket: WebSocket, clients: Clients) {
if send(
&mut socket,
&ServerMessage::Challenge {
version: wyd_common::VERSION,
version: friendolls_common::VERSION,
challenge: challenge.clone(),
},
)
@@ -74,7 +74,7 @@ async fn connected(mut socket: WebSocket, clients: Clients) {
if profile
.skin_hash
.as_deref()
.is_some_and(|hash| !wyd_common::is_skin_hash(hash))
.is_some_and(|hash| !friendolls_common::is_skin_hash(hash))
{
return;
}
@@ -335,7 +335,7 @@ fn verify(key: &VerifyingKey, bytes: &[u8], signature: &str) -> bool {
#[cfg(test)]
mod tests {
use ed25519_dalek::{Signer, SigningKey};
use wyd_common::friends_bytes;
use friendolls_common::friends_bytes;
use super::*;
+1 -1
View File
@@ -1,7 +1,7 @@
use axum::extract::ws::Message;
use friendolls_common::{ServerMessage, friends_bytes};
use tokio::sync::mpsc;
use uuid::Uuid;
use wyd_common::{ServerMessage, friends_bytes};
use super::{Clients, are_mutual_friends, verify};
+2 -2
View File
@@ -1,7 +1,7 @@
use axum::extract::ws::Message;
use tokio::sync::mpsc;
use uuid::Uuid;
use wyd_common::{Profile, ServerMessage, profile_bytes};
use friendolls_common::{Profile, ServerMessage, profile_bytes};
use super::{Client, Clients, verify};
@@ -23,7 +23,7 @@ pub(super) async fn update(
|| profile
.skin_hash
.as_deref()
.is_some_and(|hash| !wyd_common::is_skin_hash(hash))
.is_some_and(|hash| !friendolls_common::is_skin_hash(hash))
|| !verify(&client.key, &profile_bytes(&profile), signature)
{
return false;
+2 -2
View File
@@ -1,6 +1,6 @@
use axum::extract::ws::Message;
use friendolls_common::{MAX_SKIN_B64_SIZE, ServerMessage};
use uuid::Uuid;
use wyd_common::{MAX_SKIN_B64_SIZE, ServerMessage};
use super::{Clients, are_mutual_friends};
@@ -110,8 +110,8 @@ mod tests {
use base64::Engine;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use ed25519_dalek::SigningKey;
use friendolls_common::Profile;
use tokio::sync::mpsc;
use wyd_common::Profile;
use super::*;
use crate::network::Client;