Skip to content

Commit

Permalink
mess with github actions and add auto updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Leastrio committed Nov 29, 2023
1 parent 96aab78 commit bd9325c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- main
- release

jobs:
release:
Expand All @@ -24,6 +24,8 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secret.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secret.TAURI_KEY_PASSWORD }}
with:
tagName: dolos-v__VERSION__
releaseName: 'Dolos v__VERSION__'
Expand Down
Empty file added .nojekyll
Empty file.
10 changes: 6 additions & 4 deletions src-tauri/src/tcp_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ struct OutputActor {
output_reciever: mpsc::Receiver<Vec<u8>>
}

// Server for Riot Client
impl InputActor {
async fn run(mut self) {
loop {
let mut curr_buf = [0; 1024 * 64];
tokio::select! {
// Receiving from Riot Games + sending to Client
// Receiving from Output Actor
Some(data) = self.input_reciever.recv() => {
let _ = self.input_stream.write_all(&data).await;
}
// Receiving from Client + sending to Riot Games
// Receiving from Riot Client
Ok(n) = self.input_stream.read(&mut curr_buf) => {
if n > 0 {
let _ = self.output_sender.send(curr_buf[0..n].to_vec()).await;
Expand All @@ -42,12 +43,13 @@ impl InputActor {
}
}

// Connection to Riot Servers
impl OutputActor {
async fn run(mut self) {
loop {
let mut curr_buf = [0; 1024 * 64];
tokio::select! {
// Receiving from Client + sending to Riot Games
// Receiving from Input Actor
Some(data) = self.output_reciever.recv() => {
let data_str = String::from_utf8_lossy(&data);
let msg = if data_str.contains("<presence") {
Expand All @@ -57,7 +59,7 @@ impl OutputActor {
};
let _ = self.output_stream.write_all(&msg).await;
}
// Receiving from Riot Games + sending to Client
// Receiving from Riot Servers
Ok(n) = self.output_stream.read(&mut curr_buf) => {
if n > 0 {
let _ = self.input_sender.send(curr_buf[0..n].to_vec()).await;
Expand Down
7 changes: 6 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@
"csp": null
},
"updater": {
"active": false
"active": true,
"endpoints": [
"https://leastrio.github.io/Dolos/version.json"
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDNENDdCMzRCQzhENTY2MjMKUldRalp0WElTN05IUFVnaXZROVZuQ0RYWGhtajRYUFVXZ3BrZXhvUkpmUU9nZzRYT0cwbHlzVm8K",
"dialog": true
},
"windows": [
{
Expand Down

0 comments on commit bd9325c

Please sign in to comment.