Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperlarson authored Sep 3, 2024
1 parent af6d80c commit c38d35c
Showing 1 changed file with 74 additions and 13 deletions.
87 changes: 74 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 <forti_api.hpp> # universal import
#include <forti_api/*.hpp> [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 <forti_api.hpp> // Universal import for all API components
#include <forti_api/api.hpp> // Specific imports for individual components
#include <forti_api/threat_feed.hpp>
#include <forti_api/dns_filter.hpp>
#include <forti_api/system.hpp>
#include <forti_api/firewall.hpp>
// ... 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
Expand Down

0 comments on commit c38d35c

Please sign in to comment.