Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
fortigate-web-sslvpn
Advanced tools
Readme
fortigate-web-sslvpn
This module focuses on the web mode of FortiGate SSL VPN, if you are looking for the tunnel mode check out openfortivpn
.
According to https://docs.fortinet.com/document/fortigate/7.4.2/administration-guide/869159/ssl-vpn-best-practices, web-only mode provides clientless network access using a web browser with built-in SSL encryption.
You can find a documentation about this mode at https://docs.fortinet.com/document/fortigate/7.4.2/administration-guide/100733/ssl-vpn-web-mode.
You may need a script to connect over a service through SSL VPN but you don't want to (or can't) setup FortiClient or openfortivpn
on the machine running the script : this is where this module comes in handy.
In my case, I needed to connect to a service through SSL VPN from a serverless API. I couldn't use openfortivpn
because it requires root access to setup the VPN tunnel. Also I would've only one connection at a time, while I needed multiple connections at the same time. In that case, using the "web mode" is the only solution.
You can use any package manager you want, here are some examples:
# NPM
npm install fortigate-web-sslvpn
# Yarn
yarn add fortigate-web-sslvpn
# pnpm
pnpm add fortigate-web-sslvpn
import { initWebSSLVPNSession } from "fortigate-web-sslvpn";
// Authenticate and create a VPN session.
const vpn = await initWebSSLVPNSession(
"username",
"password",
"https://sslvpn.example.com" // No trailing slash or path.
);
// Use the VPN session to make requests.
const response = await vpn.request("https://service.example.com", {
method: "POST",
body: JSON.stringify({ hello: "world" }),
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer DummyTokenForExample"
}
});
// Returns a `Headers` object containing the response headers.
// Learn more at <https://developer.mozilla.org/docs/Web/API/Headers>
console.log(response.headers);
// Status code of the response as a number, e.g. `200`
console.log(response.status);
// The response body as a string.
console.log(response.data); // e.g. `{"hello":"world"}`
// You can also close the VPN session when you're done.
// Otherwise, it usually expires after 5 minutes.
await vpn.close();
FAQs
Make requests through FortiGate SSL VPN using the web mode.
The npm package fortigate-web-sslvpn receives a total of 1 weekly downloads. As such, fortigate-web-sslvpn popularity was classified as not popular.
We found that fortigate-web-sslvpn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.