Giter Site home page Giter Site logo

williamparry / cloudrig Goto Github PK

View Code? Open in Web Editor NEW
155.0 8.0 28.0 7.07 MB

Stream your applications with Parsec and AWS on the cheap.

License: MIT License

JavaScript 81.52% PowerShell 5.00% HTML 8.25% CSS 5.23%
aws-ec2 aws-ssm aws-iam steam streaming parsec gaming aws-lambda aws-sts aws-cloudwatch aws-ebs react electron

cloudrig's Introduction

cloudrig's People

Contributors

eugene-bulog avatar kianhean avatar mikesplain avatar nilbot avatar nitrikx avatar prid13 avatar putty182 avatar thmsmtylr avatar williamparry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudrig's Issues

Fix ZeroTier connectivity

This might be tied to the 1.2 release, but the computers no longer see each other.

To replicate:

  1. Set up cloudRIG
  2. Start up
  3. See how you can't ping the cloudRIG VPN address

Credentials helper

When booting up, if there are no credentials, offer to copy paste them in.

Fix Steam client port binding

Known issue with Steam client being unable to rebind to port 27036 (streaming port) after relaunch, which means a user would have to restart their computer each time.

Stop after current hour

Set a scheduled event to shut down the instance after the current hour to prevent rolling onto the next one and incurring cost.

Investigate necessity of second volume

The parsec branch has code to create and attach an EBS volume for games, rather than specifying it as a store during the spot fleet request. This is because I noticed it took a very long time to make a copy of the root EBS volume as a 256GB drive. However, that could have been just AWS being super slow at the time...

Set up status watcher

Using a Terminal UI.

  • Current spot price
  • Current snapshot status
  • Current spot request status

I'd build it as a separate .js file that can be run at the same time as the main cloudRIG file.

Automate Steam Guard

I've spent a long time on this and it's not working yet. There's OpenSSL set up, so information such as creds and codes can be sent to cloudRIG.

The problem is that AWS Run Command runs as SYSTEM and when I try and execute as another user (administrator) it's denied:

$username = "administrator" 
$password = "(pwd)"
$startWithElevatedRights = "C:\Windows\notepad.exe"

$credentials = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))
$ps = Start-Process -PassThru -FilePath powershell -Credential $credentials -ArgumentList '-noprofile -command &{Start-Process ',  $startWithElevatedRights, ' -Wait -verb runas}'

$ps.WaitForExit()

Setting a scheduled task doesn't seem to work either:

$action = New-ScheduledTaskAction -Execute "Powershell.exe" -Argument @'
-Command "Stop-Process -Name "Steam" -Force -ErrorAction SilentlyContinue ; & 'C:\Program Files (x86)\Steam\Steam.exe'"
'@
Register-ScheduledTask -Action $action -Description "description" -Force -TaskName "taskname" -TaskPath "\"

As far as I can tell the steps are:

  1. Set autologon for Administrator
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
$RegROPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"

Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String  
Set-ItemProperty $RegPath "DefaultUsername" -Value "administrator" -type String  
Set-ItemProperty $RegPath "DefaultPassword" -Value "(pwd)" -type String
Set-ItemProperty $RegPath "AutoLogonCount" -Value "1" -type DWord
Set-ItemProperty $RegROPath "(Default)" -Value "" -type String
  1. Create Steam shortcut with creds
  2. Reboot
  3. Query steam processes in a loop and check if Steamguard or Steam News is open. Something like PS:
$timeout = new-timespan -Minutes 1
$sw = [diagnostics.stopwatch]::StartNew()
start-sleep -seconds 10
while ($sw.elapsed -lt $timeout) {
    
    $steamGuardWindow = Get-Process | Where-Object { $_.mainWindowTitle -match "Steam Guard*" } | Select-Object -First 1

    $steamMainWindow =  Get-Process | Where-Object { $_.mainWindowTitle -eq "Steam" -or $_.mainWindowTitle -match "Steam - News*" } | Select-Object -First 1

    if($steamGuardWindow.Count -gt 0) {

        Write-Host "SteamGuard"
        return

    } elseif($steamMainWindow.Count -gt 0) {
        
        Write-Host "Main"
        return;

    } else {
        Write-Host "SomethingElse"
        return;
    }
 
    start-sleep -seconds 5

}
  1. If it's open, automate the key presses like:
Add-Type -AssemblyName Microsoft.VisualBasic
Add-Type -AssemblyName System.Windows.Forms

[Microsoft.VisualBasic.Interaction]::AppActivate(Steam)
Sleep 1
[System.Windows.Forms.SendKeys]::SendWait({ENTER})
Sleep 2
[System.Windows.Forms.SendKeys]::SendWait(1234)
Sleep 1
[System.Windows.Forms.SendKeys]::SendWait({ENTER})`
  1. Prompt user for Steam Guard code
  2. Automate Steam Guard code into UI

[diy-cloudrig-electron] Log scrolling

On initialise the log is not scrolling to the bottom.

Probably to do with the parent element being hidden during startup.

Line 214 in renderer.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.