Compare commits

...
11 Commits
Author SHA1 Message Date
Morteza Bashsiz 2e5a4f6848 Merge pull request #99 from MortezaBashsiz/morteza/debian
fix boost dep version
2024-09-15 17:03:34 +02:00
Morteza Bashsiz 9014c24309 fix boost dep version 2024-09-15 17:03:05 +02:00
Morteza Bashsiz c7eaa72223 Merge pull request #98 from MortezaBashsiz/morteza/debian
add dev-prerelease
2024-09-14 09:38:08 +02:00
Morteza Bashsiz 622fa3a027 add dev-prerelease 2024-09-14 09:37:38 +02:00
Morteza Bashsiz 5cb3718481 Merge pull request #97 from MortezaBashsiz/morteza/debian
update readme
2024-09-14 09:34:33 +02:00
Morteza Bashsiz 55a5f0ae6c update readme 2024-09-14 09:33:32 +02:00
Morteza Bashsiz def36619e6 Merge pull request #96 from thesudoer2/nipovpn-94
Nipovpn issue 94
2024-09-14 09:24:48 +02:00
Morteza Bashsiz 8917c12f24 Merge pull request #95 from MortezaBashsiz/morteza/debian
Morteza/debian
2024-09-13 15:03:36 +02:00
Morteza Bashsiz 7ca2fb7e73 Finish release 2024-09-13 15:01:51 +02:00
The Sudoer b385da83fd Include guard 2024-09-13 16:26:17 +03:30
Morteza Bashsiz 7c03066d3c Add release 2024-09-13 14:54:29 +02:00
15 changed files with 148 additions and 60 deletions

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
name: Build and Release Debian Package
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev build-essential lintian fakeroot devscripts cmake libssl-dev libboost-all-dev libyaml-cpp-dev
- name: Build the package
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
cd ..
mkdir -p nipovpn/usr/bin/
cp build/core/nipovpn nipovpn/usr/bin/nipovpn
dpkg-deb --build nipovpn/ build/nipovpn-stage.deb
- name: Upload the Debian nipovpn as an artifact
uses: actions/upload-artifact@v3
with:
name: nipovpn
path: build/nipovpn-stage.deb
- name: Show nipovpn information
run: |
dpkg -I build/nipovpn-stage.deb
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: nipovpn
path: ./
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag_name: 'v1.0.${{ github.run_number }}'
release_name: Release ${{ github.run_number }}
draft: false
prerelease: true
- name: Upload Debian Package to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nipovpn-stage.deb
asset_name: nipovpn-stage.deb
asset_content_type: application/octet-stream
+64 -11
View File
@@ -1,19 +1,72 @@
name: build debian
name: Build and Release Debian Package
on:
push:
branches: [ "morteza/debian" ]
# paths:
# - 'core/**'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: build-deb-action
uses: jiro4989/build-deb-action@v3.1.0
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev build-essential lintian fakeroot devscripts cmake libssl-dev libboost-all-dev libyaml-cpp-dev
- name: Build the package
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
cd ..
mkdir -p nipovpn/usr/bin/
cp build/core/nipovpn nipovpn/usr/bin/nipovpn
dpkg-deb --build nipovpn/ build/nipovpn.deb
- name: Upload the Debian nipovpn as an artifact
uses: actions/upload-artifact@v3
with:
package_root: ./nipovpn
name: nipovpn
path: build/nipovpn.deb
- name: Show nipovpn information
run: |
dpkg -I build/nipovpn.deb
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: nipovpn
path: ./
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag_name: 'v1.0.${{ github.run_number }}'
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false
- name: Upload Debian Package to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nipovpn.deb
asset_name: nipovpn.deb
asset_content_type: application/octet-stream
+2 -3
View File
@@ -49,7 +49,7 @@ Create the log directory and log file
Run it
```bash
sudo build/core/nipovpn_core server nipovpn/etc/nipovpn/config.yaml
sudo build/core/nipovpn server nipovpn/etc/nipovpn/config.yaml
2024-08-02_15:30:07 [INFO] Config initialized in server mode
2024-08-02_15:30:07 [INFO]
Config :
@@ -80,9 +80,8 @@ Config :
#### Install
Currently it is only available for debian based Linuxs and fully tested on ubuntu 24.04
You can simply install the package
You can simply down load and install the package. To download it please visit the [releases page](https://github.com/MortezaBashsiz/nipovpn/tags) and get the latest release.
```bash
[~]>$ wget https://raw.githubusercontent.com/MortezaBashsiz/nipovpn/main/files/deb/nipovpn.deb
[~]>$ sudo apt install ./nipovpn.deb
```
+1 -1
View File
@@ -1,4 +1,4 @@
set(CORE_TARGET nipovpn_core)
set(CORE_TARGET nipovpn)
set(CMAKE_CXX_STANDARD 20)
set(CORE_TARGET_HEADERS
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef AGENTHADLER_HPP
#define AGENTHADLER_HPP
#include <boost/beast/core/detail/base64.hpp>
#include <memory>
@@ -100,5 +98,3 @@ private:
std::mutex mutex_;///< Mutex to make the class thread-safe
};
#endif /* AGENTHADLER_HPP */
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef CONFIG_HPP
#define CONFIG_HPP
#pragma once
#include <yaml-cpp/yaml.h>
@@ -85,5 +84,3 @@ public:
std::string modeToString() const;
std::string toString() const;
};
#endif /* CONFIG_HPP */
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef GENERAL_HPP
#define GENERAL_HPP
#include <openssl/conf.h>
#include <openssl/err.h>
@@ -466,5 +464,3 @@ inline BoolStr validateConfig(int argc, const char *argv[]) {
result.message = "OK";
return result;
}
#endif// GENERAL_HPP
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef HTTP_HPP
#define HTTP_HPP
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
@@ -146,5 +144,3 @@ private:
TlsRequest parsedTlsRequest_;
boost::uuids::uuid uuid_;
};
#endif /* HTTP_HPP */
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef RUNNER_HPP
#define RUNNER_HPP
#include <atomic>
#include <boost/asio/executor_work_guard.hpp>
#include <boost/asio/io_context.hpp>
@@ -75,5 +72,3 @@ private:
// Add strand to manage concurrency
boost::asio::strand<boost::asio::io_context::executor_type> strand_;
};
#endif /* RUNNER_HPP */
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef SERVERHANDLER_HPP
#define SERVERHANDLER_HPP
#include <memory>
@@ -97,5 +95,3 @@ private:
std::mutex mutex_;///< Mutex to make the class thread-safe
};
#endif /* SERVERHANDLER_HPP */
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef TCPCLIENT_HPP
#define TCPCLIENT_HPP
#include <boost/asio.hpp>
#include <boost/bind/bind.hpp>
@@ -131,5 +129,3 @@ private:
// Mutex for protecting access to the socket and buffers
mutable std::mutex mutex_;
};
#endif /* TCPCLIENT_HPP */
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef TCPCONNECTION_HPP
#define TCPCONNECTION_HPP
#include <boost/asio.hpp>
#include <boost/bind/bind.hpp>
@@ -90,5 +88,3 @@ private:
std::mutex mutex_;///< Mutex to make the class thread-safe
};
#endif /* TCPCONNECTION_HPP */
-4
View File
@@ -1,6 +1,4 @@
#pragma once
#ifndef TCPSERVER_HPP
#define TCPSERVER_HPP
#include <boost/asio.hpp>
#include <boost/bind/bind.hpp>
@@ -69,5 +67,3 @@ private:
// Strand to ensure that handler functions are not called concurrently.
boost::asio::strand<boost::asio::io_context::executor_type> strand_;
};
#endif /* TCPSERVER_HPP */
+1 -1
View File
@@ -4,7 +4,7 @@
C++20 or higher
libyaml-cpp >= 0.8
boost-libs >= 1.75.0
boost-libs >= 1.83.0
OpenSSL
### Dependencies
+7 -7
View File
@@ -1,7 +1,7 @@
Package: nipovpn
Version: 0.1
Maintainer: Morteza Bashsiz
Architecture: amd64
Description: Powerfull and Secure http/s Proxy
Depends: libyaml-cpp0.8
Homepage: https://github.com/MortezaBashsiz/nipovpn
Package : nipovpn
Version : 0.1
Maintainer : Morteza Bashsiz
Architecture : amd64
Description : Powerfull and Secure http/s Proxy
Depends : libyaml-cpp0.8
Homepage : https://github.com/MortezaBashsiz/nipovpn