I hereby claim:
- I am qdm12 on github.
- I am quentinmcgaw (https://keybase.io/quentinmcgaw) on keybase.
- I have a public key ASBlAMEoY0Klst0SL3OKjRWJoHypVzpY9eEfyFvwxZWvGAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
ARG GO_VERSION=1.13 | |
ARG ALPINE_VERSION=3.10 | |
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} | |
ARG USERNAME=vscode | |
ARG USER_UID=1000 | |
ARG USER_GID=1000 | |
# Setup user | |
RUN adduser $USERNAME -s /bin/sh -D -u $USER_UID $USER_GID && \ |
{ | |
"name": "Your project Dev", | |
"dockerFile": "Dockerfile", | |
// "appPort": 8000, | |
"extensions": [ | |
"ms-vscode.go", | |
"davidanson.vscode-markdownlint", | |
"shardulm94.trailing-spaces", | |
"IBM.output-colorizer" | |
], |
dist: xenial | |
sudo: required | |
env: | |
global: | |
- DOCKER_REPO=<DOCKER_USER/DOCKER_IMAGE> | |
before_install: | |
- curl -fsSL https://get.docker.com | sh | |
- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json | |
- mkdir -p $HOME/.docker | |
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json |
#!/bin/bash | |
if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ "$TRAVIS_BRANCH" != "master" ]; then | |
docker buildx build \ | |
--progress plain \ | |
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \ | |
. | |
exit $? | |
fi | |
echo $DOCKER_PASSWORD | docker login -u qmcgaw --password-stdin &> /dev/null |
package params | |
import ( | |
"fmt" | |
"net" | |
"strings" | |
) | |
// GetExtraSubnets obtains the CIDR subnets from the comma separated list of the | |
// environment variable EXTRA_SUBNETS |
func buildBlockedIPs(client network.Client, blockMalicious, blockAds, blockSurveillance bool, | |
privateAddresses []string) (lines []string, errs []error) { | |
chResults := make(chan []string) | |
chError := make(chan error) | |
listsLeftToFetch := 0 | |
if blockMalicious { | |
listsLeftToFetch++ | |
go func() { | |
results, err := getList(client, string(constants.MaliciousBlockListIPsURL)) | |
chResults <- results |
package pia | |
import ( | |
"fmt" | |
"net" | |
"github.com/qdm12/golibs/files" | |
"github.com/qdm12/private-internet-access-docker/internal/constants" | |
"github.com/qdm12/private-internet-access-docker/internal/models" | |
) |
func (c *configurator) runIptablesInstruction(instruction string) error { | |
flags := strings.Fields(instruction) | |
if output, err := c.commander.Run("iptables", flags...); err != nil { | |
return fmt.Errorf("failed executing %q: %s: %w", instruction, output, err) | |
} | |
return nil | |
} | |
func (c *configurator) Clear() error { | |
c.logger.Info("%s: clearing all rules", logPrefix) |