From c38d35c72b74892cdb1f10fa8b81fb4d8ba5436b Mon Sep 17 00:00:00 2001 From: Cooper Larson <26559155+cooperlarson@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:53:24 -0600 Subject: [PATCH] Update README.md --- README.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 70ad385..bbc9158 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,93 @@ -# forti-api +# **Forti-API** -**Empowering FortiGate Users with Streamlined API Access** +## **Streamlined API Access for FortiGate** -Welcome to **forti-api**, an open-source project designed to unlock the full potential of FortiGate's API. Developed through meticulous research and practical application, **forti-api** makes it easier for network security professionals to harness FortiGate's powerful, yet often complex, capabilities. +Welcome to Forti-API, an open-source project crafted to simplify and enhance your interaction with FortiGate's powerful APIs. Designed with network security professionals in mind, Forti-API transforms complex API tasks into streamlined operations, empowering you to unlock the full potential of your FortiGate systems. +## 🌟 **Early Access** 🌟 -## Project Vision +Get started with **Forti-API** effortlessly using Conan for dependency management. Whether you're using **Meson** or **CMake**, integrating Forti-API into your project is straightforward! +### 📦 **Add the Forti-API Remote** -### Simplifying FortiGate Management +First, add the Forti-API remote to your Conan configuration: -**forti-api** is designed to turn the intricate world of FortiGate firewall management into something straightforward and accessible. By providing a clean interface that integrates seamlessly with your existing setup, this tool simplifies complex configurations, making advanced network management more approachable for everyone. +```bash +conan remote add forti-api https://repo.cooperhlarson.com/artifactory/api/conan/fortigate +``` -### Real-World Impact +### **Add the Dependency to Conan** -With tools like **forti-hole** and **forti2ban**, **forti-api** integrates Pi-hole and Fail2Ban directly into the FortiGate ecosystem. These integrations have been proven to significantly enhance network security, achieving a 97% block-rate against ad traffic with the advanced DNS filter—transforming ad-heavy sites into cleaner, faster-loading pages, and reducing unnecessary network traffic by up to 20%. +There are several ways to do this + +**conanfile.py**: The more modern way with v2+ syntax + +```python +class Pkg(ConanFile): + name = "my_project" + requires = ['forti-api/0.1.11'] # This is option 1 + + def requirements(self): + self.requires('forti-api/0.1.11') # This is option 2, do not define requirements twice + self.test_requires('gtest/1.14.0') # 'test-requires' support makes this a best practice +``` + +**conanfile.txt**: while simpler, conanfile.py is preferred for more extensability + +```bash +[requires] +forti-api/0.1.11 +``` + +### 🚀 **Build System Integration** +Integrates Easily with Meson or CMake + +**Meson** +```meson +forti_api_dep = dependency('forti-api', required: true) +``` -## Project Overview +**CMake** +```cmake +# Add Forti-API as a dependency +find_package(forti-api REQUIRED) -### Current Phase +# Link Forti-API to your target +target_link_libraries(your_project_name PRIVATE forti-api::forti-api) +``` -The core API support is in place, with ongoing optimizations to enhance functionality and ease of use. Comprehensive build instructions are on the way, along with a streamlined Conan installation process via a dedicated Artifactory server for effortless setup. +**Include** +``` +#include # universal import +#include [api, threat_feed, dns_filter, system, firewall] + more planned in near future +``` -### Future Developments +### 🛠️ **Including Headers** +After setting up the dependency, you can include the necessary headers in your source files: -The project is rapidly progressing, with plans to submit a pull request to ConanCenter's index repo in the near future. **forti-api** is poised to become an essential tool for anyone managing FortiGate firewalls. +```cpp +#include // Universal import for all API components +#include // Specific imports for individual components +#include +#include +#include +#include +// ... more modules coming soon! +``` + + +## Project Vision + + +### Simplifying FortiGate Management + +**forti-api** is designed to turn the intricate world of FortiGate firewall management into something straightforward and accessible. By providing a clean interface that integrates seamlessly with your existing setup, this tool simplifies complex configurations, making advanced network management more approachable for everyone. + +### Real-World Impact + +With tools like **forti-hole** and **forti2ban**, **forti-api** integrates Pi-hole and Fail2Ban directly into the FortiGate ecosystem. These integrations have been proven to significantly enhance network security, achieving a 97% block-rate against ad traffic with the advanced DNS filter—transforming ad-heavy sites into cleaner, faster-loading pages, and reducing unnecessary network traffic by up to 20%. ## Engagement and Contributions