И только в крайнем случае рассматривал эти Poverline
[Unit]
Description=SSTP VPN server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/sstpd -f /etc/sstpd.ini
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
2025-01-27 16:00:00,915 INFO: SSTP control packet (CALL_CONNECT_REQUEST) received.
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,917 INFO: Registered address 172.16.117.5
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,923 WARNING: Received errors from pppd.
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,924 WARNING: b'/usr/sbin/pppd: The remote system is required to authenticate itself\n'
Jan 27 16:00:00 51285.ip-ptr.tech pppd[8485]: The remote system is required to authenticate itself
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,925 WARNING: Received errors from pppd.
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,925 WARNING: b"/usr/sbin/pppd: but I couldn't find any suitable secret (password) for it to use to do so.\n"
Jan 27 16:00:00 51285.ip-ptr.tech pppd[8485]: but I couldn't find any suitable secret (password) for it to use to do so.
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,926 WARNING: Received errors from pppd.
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,926 WARNING: b'/usr/sbin/pppd: (None of the available passwords would let it use an IP address.)\n'
Jan 27 16:00:00 51285.ip-ptr.tech pppd[8485]: (None of the available passwords would let it use an IP address.)
Jan 27 16:00:00 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:00,928 INFO: pppd exited with code 1.
Jan 27 16:00:01 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:01,289 INFO: Connection finished.
Jan 27 16:00:01 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:01,290 WARNING: PPP process is gone already
Jan 27 16:00:01 51285.ip-ptr.tech sstpd[8473]: 2025-01-27 16:00:01,290 INFO: Unregistered address 172.16.117.5
root@51285:/home/stealch# systemctl status sstpd.service
* sstpd.service - SSTP VPN server
Loaded: loaded (/etc/systemd/system/sstpd.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2025-01-27 13:53:37 EET; 5min ago
Main PID: 1591 (sstpd)
CGroup: /system.slice/sstpd.service
`-1591 /usr/bin/python3 /usr/local/bin/sstpd -f /etc/sstpd.ini
Jan 27 13:53:37 51285.ip-ptr.tech systemd[1]: sstpd.service: Service hold-off time over, scheduling restart.
Jan 27 13:53:37 51285.ip-ptr.tech systemd[1]: Stopped SSTP VPN server.
Jan 27 13:53:37 51285.ip-ptr.tech systemd[1]: Started SSTP VPN server.
Jan 27 13:53:37 51285.ip-ptr.tech sstpd[1591]: 2025-01-27 13:53:37,441 INFO: Cert SHA-1: 2e148f316d4e20249aa24e8154b3f730336836ee
Jan 27 13:53:37 51285.ip-ptr.tech sstpd[1591]: 2025-01-27 13:53:37,442 INFO: Cert SHA-256: f996d570fbd82ebb7b6e4260384c9e24ae32c43285f39990e7b48b07d3719175
Jan 27 13:53:37 51285.ip-ptr.tech sstpd[1591]: 2025-01-27 13:53:37,443 INFO: Running without uvloop
Jan 27 13:53:37 51285.ip-ptr.tech pppd[1593]: /usr/lib/pppd/2.4.7/sstp-pppd-plugin.so: cannot open shared object file: No such file or directory
Jan 27 13:53:37 51285.ip-ptr.tech pppd[1593]: Couldn't load plugin sstp-pppd-plugin.so
Jan 27 13:53:37 51285.ip-ptr.tech sstpd[1591]: 2025-01-27 13:53:37,461 INFO: Listening on 0.0.0.0:443...
root@51285:/home/stealch# journalctl -u sstpd.service
-- Logs begin at Mon 2025-01-27 13:43:55 EET, end at Mon 2025-01-27 13:48:57 EET. --
Jan 27 13:48:33 51285.ip-ptr.tech systemd[1]: Started SSTP VPN server.
Jan 27 13:48:33 51285.ip-ptr.tech sstpd[1284]: 2025-01-27 13:48:33,893 CRITICAL: [Errno 2] No such file or directory
Jan 27 13:48:33 51285.ip-ptr.tech sstpd[1284]: 2025-01-27 13:48:33,894 CRITICAL: Cannot read certificate.
Jan 27 13:48:33 51285.ip-ptr.tech systemd[1]: sstpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 27 13:48:33 51285.ip-ptr.tech systemd[1]: sstpd.service: Unit entered failed state.
Jan 27 13:48:33 51285.ip-ptr.tech systemd[1]: sstpd.service: Failed with result 'exit-code'.
Зачем вы применили атрибут [STAThread] к метод Install?
просто указать static async Task Main()
string SourcePath = Path.Combine(temp, folderName);
string DestinationPath = unpack;
try
{
using (ZipArchive archive = ZipFile.OpenRead(zipPath))
{
archive.ExtractToDirectory(temp);
}
MessageBox.Show(
folderName + " successfully downloaded.",
"Download complete!",
MessageBoxButtons.OK,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly);
}
finally
{
//Создать идентичное дерево каталогов
foreach (string dirPath in Directory.GetDirectories(SourcePath, "*", SearchOption.AllDirectories))
Directory.CreateDirectory(dirPath.Replace(SourcePath, DestinationPath));
//Скопировать все файлы. И перезаписать(если такие существуют)
foreach (string newPath in Directory.GetFiles(SourcePath, "*.*", SearchOption.AllDirectories))
File.Copy(newPath, newPath.Replace(SourcePath, DestinationPath), true);
};
Directory.Delete(temp, true);
Ошибка CS8370 Компонент "оператор range" недоступен в C# 7.3. Используйте версию языка 8.0 или выше.
Ошибка CS0518 Предопределенный тип "System.Range" не определен или не импортирован
Ошибка CS0518 Предопределенный тип "System.Index" не определен или не импортирован
Ошибка CS8370 Компонент "ссылочные типы, допускающие значение NULL" недоступен в C# 7.3. Используйте версию языка 8.0 или выше.
foreach (var entry in archive.Entries.Where(e => e.FullName.StartsWith(folder.FullName)))