Skip to content

Commit

Permalink
Breaking: update precomp script and vpncheck
Browse files Browse the repository at this point in the history
  • Loading branch information
MCterra10 committed Apr 13, 2021
1 parent 2121bac commit 37fa9da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file is for configuration options for the API. Included by all other files that handle requests.

// Current API Version
$apiVersion = 1.5;
$apiVersion = 1.6;

// Key used to authenticate communications between the BYOND server and the API. Keep this secure.
$authKey = "auth_key";
Expand Down
6 changes: 3 additions & 3 deletions api/vpncheck/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
$result = ['whitelisted' => boolval($output), 'response' => ''];
// We have no authorization to make a query, so just tell the server the IP is safe.
if($vpnAuth === "none") {
$result['response'] = json_encode(['security' => ['vpn' => false, 'tor' => false, 'proxy' => false, 'hosting' => false]]);
} else { //we're authorized, query the API
$result['response'] = json_encode(['vpn' => false, 'tor' => false, 'proxy' => false, 'hosting' => false, 'success' => true]);
}/* else { //we're authorized, query the API - Disabled for the foreseeable future due to disuse, and is outdated.
$result['response'] = file_get_contents("https://ipinfo.io/{$_GET['ip']}/privacy?token={$vpnAuth}");
}
}*/

// We get the response, at last, echo it out and we're done.
echo json_encode($result);
Expand Down
2 changes: 1 addition & 1 deletion secure-api/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Note: This is a stripped down config file for the secure endpoints.

// Current API Version
$apiVersion = 1.5;
$apiVersion = 1.6;

// Key used to authenticate communications between the BYOND server and the API. Keep this secure.
$authKey = "auth_key";
Expand Down
8 changes: 8 additions & 0 deletions tgs/PreCompile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ param (
$repo
)

# Config
# Server ID number. This should match what's in your goon server config.
$server_id = 1

# Get the commit ID first
Set-Location "$game_directory\..\..\Repository"
$commit = git rev-parse --short HEAD
Expand Down Expand Up @@ -70,6 +74,10 @@ Add-Content -Path $build_file -Value "#define BUILD_TIME_MINUTE $(Get-Date -Form
Add-Content -Path $build_file -Value "#define BUILD_TIME_SECOND $(Get-Date -Format '%s')"
Add-Content -Path $build_file -Value "#define BUILD_TIME_UNIX $(Get-Date -UFormat %s -Millisecond 0)"

# Server ID
Write-Host "Setting server ID number..."
Add-Content -Path $build_file -Value "#define SERVER_NUMBER $server_id"

# Preload - This is just a static string
Write-Host "Setting preload URL..."
Add-Content -Path $build_file -Value "#define PRELOAD_RSC_URL `"http://rsc.austation.net/goonstation.zip`""
Expand Down

0 comments on commit 37fa9da

Please sign in to comment.