7 Commits

Author SHA1 Message Date
Alec Scott
5ff46dc02e Merge pull request #27 from hyprspace/add/UPnP
Add initial support for UPnP to Hyprspace
2021-08-21 12:06:45 -07:00
Alec Scott
52c78391bb Add initial support for UPnP to Hyprspace 2021-08-21 12:04:47 -07:00
Alec Scott
c5ccc0daaa Update README.md 2021-07-22 09:56:38 -07:00
Alec Scott
795da55458 Update README.md 2021-07-22 09:54:27 -07:00
Alec Scott
5b957d3ed7 Create codeql-analysis.yml 2021-07-13 15:48:08 -07:00
Alec Scott
f9c74c1cc1 Merge pull request #19 from max-privatevoid/patch-1
Don't hardcode `ip` binary path
2021-07-08 18:54:11 -07:00
Max
17f09c48dc Don't hardcode ip binary path
Not all systems install the binary in this path, a correctly configured PATH environment variable should suffice.
2021-07-05 22:49:03 +02:00
4 changed files with 76 additions and 1 deletions

71
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '21 19 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -2,6 +2,7 @@
# Hyprspace
[![Go Report Card](https://goreportcard.com/badge/github.com/hyprspace/hyprspace)](https://goreportcard.com/report/github.com/hyprspace/hyprspace)
[![](https://img.shields.io/matrix/hyprspace:matrix.org)](https://matrix.to/#/%23hyprspace:matrix.org)
A Lightweight VPN Built on top of Libp2p for Truly Distributed Networks.

View File

@@ -30,6 +30,9 @@ func CreateNode(ctx context.Context, inputKey string, port int, handler network.
node, err = libp2p.New(ctx,
libp2p.ListenAddrStrings(fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", port)),
libp2p.Identity(privateKey),
libp2p.DefaultSecurity,
libp2p.NATPortMap(),
libp2p.FallbackDefaults,
)
if err != nil {
return

View File

@@ -46,7 +46,7 @@ func Delete(name string) (err error) {
}
func ip(args ...string) (err error) {
cmd := exec.Command("/sbin/ip", args...)
cmd := exec.Command("ip", args...)
err = cmd.Run()
return
}