Skip to content

Commit

Permalink
Merge pull request #33 from GalaxyPay/dev
Browse files Browse the repository at this point in the history
chore: release v2.1.0
  • Loading branch information
acfunk authored Dec 14, 2024
2 parents 8e1aef8 + 9df6ea3 commit 3f954b3
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: v2.0.6
tag: v2.1.0
artifacts: "Output/*"
2 changes: 1 addition & 1 deletion FUNC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FUNC"
#define MyAppVersion "2.0.6"
#define MyAppVersion "2.1.0"
#define MyAppPublisher "Galaxy Pay, LLC"
#define MyAppPublisherURL "https://galaxy-pay.com"
#define MyPublishPath "publish"
Expand Down
1 change: 0 additions & 1 deletion FUNC/Controllers/GoalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using FUNC.Models;
using Microsoft.AspNetCore.Mvc;
using Octokit;
using static System.Environment;
using static System.OperatingSystem;

namespace FUNC.Controllers
Expand Down
9 changes: 7 additions & 2 deletions FUNC/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using FUNC;
using Microsoft.Net.Http.Headers;

var builder = WebApplication.CreateBuilder(args);
Expand All @@ -7,9 +8,13 @@
builder.Services.AddControllers();
builder.Services.AddWindowsService();
builder.Services.AddSystemd();
builder.WebHost.ConfigureKestrel(serverOptions =>
builder.WebHost.ConfigureKestrel(options =>
{
serverOptions.ListenAnyIP(3536);
options.ListenAnyIP(3536);
options.ListenAnyIP(3537, listenOptions =>
{
listenOptions.UseHttps(X509.Generate(subject: "FUNC"));
});
});

var app = builder.Build();
Expand Down
2 changes: 1 addition & 1 deletion FUNC/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:3536",
"applicationUrl": "http://localhost:3536;https://localhost:3537",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
54 changes: 54 additions & 0 deletions FUNC/X509.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// <copyright file="X509.cs" company="slskd Team">
// Copyright (c) slskd Team. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see https://www.gnu.org/licenses/.
// </copyright>

namespace FUNC
{
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;

/// <summary>
/// X509 utility methods.
/// </summary>
public static class X509
{
/// <summary>
/// Generates an X509 certificate for the specified <paramref name="subject"/>.
/// </summary>
/// <param name="subject">The certificate subject.</param>
/// <param name="x509KeyStorageFlags">The optional key storage flags for the certificate.</param>
/// <returns>The generated certificate.</returns>
public static X509Certificate2 Generate(string subject, X509KeyStorageFlags x509KeyStorageFlags = X509KeyStorageFlags.MachineKeySet)
{
var password = Guid.NewGuid().ToString();

using RSA rsa = RSA.Create(2048);

var request = new CertificateRequest(
new X500DistinguishedName($"CN={subject}"),
rsa,
HashAlgorithmName.SHA256,
RSASignaturePadding.Pkcs1);

var certificate = request.CreateSelfSigned(
new DateTimeOffset(DateTime.UtcNow.AddDays(-1)),
new DateTimeOffset(DateTime.UtcNow.AddDays(365)));

return new X509Certificate2(certificate.Export(X509ContentType.Pkcs12, password), password, x509KeyStorageFlags);
}
}
}
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Head over to the [releases page](https://github.com/GalaxyPay/func/releases) and

The installer does not include the node software. It is automatically downloaded from [this open-source repo](https://github.com/GalaxyPay/go-algo-win) (Windows) or [the official Algorand repo](https://github.com/algorand/go-algorand) (Mac/Linux) the first time you open the app. This separation allows the node software to be updated without needing to update this app.

The app is a [locally hosted webpage](http://localhost:3536). After install, bookmark it for easy access.

### Windows

In order to run it, you'll need to click "More info" on the "Windows protected your PC" dialog.
Expand Down Expand Up @@ -59,25 +61,44 @@ The app is a **Node Service Manager** - uninstalling it will **_not_** remove no
- Deletes all node data, including any participation and KMD keys
- Only available when Service does not exist

## Notes
## Participating in Consensus

- The app is a [locally hosted webpage](http://localhost:3536). After install, bookmark it for easy access.
If you want to participate in consensus, you'll need to generate a Participation Key for your account and register that key with account to bring it "online".

- If you want to access the site from another computer on your network, you will need to open the following ports:
[Read more about how Participation Keys function in the Algorand Consensus Protocol](https://developer.algorand.org/docs/get-details/algorand_consensus/#participation-keys)

- 3536 - FUNC UI and API
- 8081 - Algorand algod
- 8082 - Voi algod
- 8083 - Fnet algod
Here's how to do it:

- The `algod` ports are configurable through the UI, and you only need to open the ones for the networks you use
1. Wait for your node to sync.
2. Connect your wallet.
3. Click the + icon in the Participation Keys section.
4. Click Generate and wait. It takes a few minutes for your node to generate the Participation Key.
5. Once the key is generated, click on the handshake icon to sign the Key Registration transaction.
6. Your key should now be active, and your Participating in Consensus light should be green.

- This should **ONLY** be done on a local network - **DO NOT** open these ports to the internet
## Notes

- The app is a locally hosted webpage, <http://localhost:3536>. After install, bookmark it for easy access.

- The node will restart automatically if your computer reboots, but you will need to configure your computer to **_not_** go into Sleep mode in order to keep the node running 24/7.

- If you Stop a node and restart your computer, the node will restart automatically. You must remove the service if you want the node to not restart. Removing the service preserves the node data; deleting the data is a separate step.

### Remote Access (Advanced)

- If you want to access the site from another computer on your network, you will need to open the following ports:

- 3536 AND 3537 - FUNC UI and API
- 8081 - Algorand algod
- 8082 - Voi algod
- 8083 - Fnet algod

- The `algod` ports are configurable through the UI, and you only need to open the ones for the networks you use

- This should **ONLY** be done on a local network - **DO NOT** open these ports to the internet

- If you want to be able to use WalletConnect wallets (e.g. Defly, Pera) while accessing the site via IP, you'll need to use port 3537 which serves the site with a self-signed cert over HTTPS. You'll also need "Allow Insecure Content" for the site in your browser settings so that it can communicate to your node over HTTP.

## Build (for Developers)

You can fork the repo and let Github Actions do the build for you, or you can run [LocalPublish.ps1](LocalPublish.ps1) for Windows, or [local-publish.sh](local-publish.sh) and [create-package.sh](create-package.sh) for Linux.
Expand Down
2 changes: 1 addition & 1 deletion create-package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -r Output

PKG=Output/func_2.0.6_linux-$1
PKG=Output/func_2.1.0_linux-$1

mkdir -p $PKG/lib/systemd/system
mkdir -p $PKG/opt/func
Expand Down
2 changes: 1 addition & 1 deletion deb/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 2.0.6
Version: 2.1.0
Section: base
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion deb/arm64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 2.0.6
Version: 2.1.0
Section: base
Priority: optional
Architecture: arm64
Expand Down
3 changes: 2 additions & 1 deletion deb/postinst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
systemctl daemon-reload
systemctl start func
systemctl restart func
systemctl enable func
systemctl enable func
echo "FUNC App: http://localhost:3536"
5 changes: 4 additions & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "func-webui",
"version": "2.0.6",
"version": "2.1.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@mdi/js": "^7.4.47",
"@perawallet/connect": "^1.3.5",
"@txnlab/use-wallet-vue": "^3.8.0",
"algosdk": "2.9.0",
"axios": "^1.7.7",
"lute-connect": "^1.4.1",
"roboto-fontface": "^0.10.0",
"vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.4.31",
Expand Down
Loading

0 comments on commit 3f954b3

Please sign in to comment.