Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e5a4f6848 | ||
|
|
9014c24309 | ||
|
|
c7eaa72223 | ||
|
|
622fa3a027 | ||
|
|
5cb3718481 | ||
|
|
55a5f0ae6c | ||
|
|
def36619e6 | ||
|
|
8917c12f24 | ||
|
|
7ca2fb7e73 | ||
|
|
b385da83fd | ||
|
|
7c03066d3c |
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
@@ -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
@@ -1,4 +1,4 @@
|
||||
set(CORE_TARGET nipovpn_core)
|
||||
set(CORE_TARGET nipovpn)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
set(CORE_TARGET_HEADERS
|
||||
|
||||
@@ -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
@@ -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 */
|
||||
@@ -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
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
C++20 or higher
|
||||
libyaml-cpp >= 0.8
|
||||
boost-libs >= 1.75.0
|
||||
boost-libs >= 1.83.0
|
||||
OpenSSL
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user