-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Setup gradle initial project * Gradle simple setup * Setup patch version wildcards * will continue later * migrating plugin * setup dnsjava lib * Basic client server conversation * Simple remote server proxy * Native image working * Dagger initial setup * Add some writer threads to udp server * creating wildcard builder * working on docker solver * configuring docker solver * adjustments * Fixing ip parse * docker client dep * Created real docker client solver * refactoring * getting ip from bridge network * Fixing hostname matching from env * configuring docker client package * Setup docker java client reflection * Fixing spearator * adjusting reflection * adjusting reflection * More reflection stuff * Adjusting * Native image log fixed * removing unnecessary files * refactoring packages * unused class * fixing javadoc * unifiying * quarkus working * add instructions * Settings * Setup solvers * Setup missing beans * Json config contract * fixing readme * clearing gradle * deleting dagger files * flags structure * Setup jcommander dependency * some docs * Before pico cli refactoring * Setup pico cli * testing flagts * Some tests created * Fixing help formatting * Testing the version * Setup version get * setup help * refactoring * Setup configs * Simplifying * Refactoring * javadoc * Mapping json and env configs * Mapped configs * Test is passing * Adjusting tests * More tests * Fixing tests * Customizing http server port * configuring log level * Keep going * All configs matched * Implementing and test config json v1 * formatting * Fixing test * Fixing test * Fixing quarkus startup for testing * otimization * DPS 3 - System Solver (#271) * System solver is done * Fixing bean injection * Solver working * Testing * Configuring native image to work again * fixing docker java jna stuff * Adjusting graalvm reflection config * missing docker java reflection config * Creating test for solver system native image * Fixing intermitent test * fixing tests * Fixing test * Fixing native test * New method * back to the old and good reflect.json generated by 'reflection-config-generator' * DPS 3 - Remote solver complete (#272) * Setup remote servers config * Testing default dns servers * Fixing tests * Fixing test * Fixing tests * Fixing test * Fixing tests * Fixing tests * Fixing all tests * Set default timeout * Some fixes * Adjusting version * DPS 3 - Local DB Solver (#273) * configuring image heap * Configuring env hostnames retrieve * Testing default id generator * Ajusting logs * ServerLocal is working * Fixing test * Fixing test * Test is not completed * did a lot of changes to fix the test * Fixing the test * Fixing test * More tests * Fixing more tests * Fixing test * Fixing one more test * Fixing one more test * fixing tests * Refactoring * Clean code * DPS 3 - Docker networks (#274) * DPS network draft code * adjustments * Connect running containers to dps network at startup * adjustments * Fixing containers attach check * Solve from label, dps, bridge, then default * logs adjustment * Refactoring * checkstyle * DPS 3 - Docker Register Service Names (#275) * removing already done todos * Implementing * refactoring * refactoring * Testing * Testing * Fixing intermitent test * Configuring reflection * Must change log level just for mageddo package * Fixing bug * Fixing bug * checking docker is connected (#276) * Fixing tests (#277) * created active env api * Ignoring static folder * DPS 3 - GUI REST API (#278) * New apis created * new rest apis * Fixing gui api filling * Update api * Remove hostnane endpoint api * Refactoring * Fixing apis * Updating copyright * Updating developing instructions * Reverting test * DPS - 3 LocalDB Solver CNAME Support (#279) * Cname support * Testing and fixing tests * Fixing tests * Fixing cname solving * Fixing tests * adjusts * adjusts * adjusts * DPS 3 - Auto Configure (#280) * Linux default configurator is workign * testing * Restore config * Ajusts * adjusts * Todos * Resverting dep * Fixing tests * Fixing tests * Fixing tests * DPS - 3 DNS Resolution Hangs Fixes (#281) * Setup solver caching * handling erors * Ajusting copy * Must clone record before merge them * Ajusting * Adjusting message building * Caching no results for 10 seconds * Leading with concurrency * adjusting address binding * adjusting version * DPS 3 - Minimal debug log (#282) * Reducing the logs * Adjusting logh * Fixing compiling errors * deleting v2 files (#283) * Deleting * DPS 3 - CI/CD (#284) * Add doc * ci * ci * ci * Adjusting test * Adjusting test * Adjusting jarname * some frustated tries * Create config dir if dont exists * checkpoint * Refactoring docker connection check * Unnecessary code * Adjusting reflection config * Deleting unused file * need to scan whole package * Trying to fix jna * Probably fixing jna * Fixing docker build * Trying to fix library reflection * Fixing reference * Fixing reference * old libc compatibility * cleanup * Refactoring * Cd is probably ready * some fixes * Adjusting * Ajusting CD * Cleanup * Ajusting CD * Ajusting CD * Ajusting CD * Ajusting service name * Setup logs * adjusts * Adjusting * Release notes * Bump version * Adjusting deploy * Adjusting deploy * new try * new try * new try * Fully working * Adjusting envs * Migrating image * Migrating image * Fixing * Clearing and specify version * bump * bump version * Adjustments * Adjustments * Adjustments * Fixing home page * adjusting * new version * docs deploy workflow * fixing command * adjustments * upgrading * fixing branch * bump * update * configuring version * forcing checkout * fixing latest version * Generate on tags not pull requests * fixing command * fixing broken symbolic link because of gradle * fixing cd * gracefull exit * run cd only on master * cancel previous job * byump
- Loading branch information
Showing
643 changed files
with
10,806 additions
and
185,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
**/node_modules | ||
build | ||
#* | ||
#!build/*-runner | ||
#!build/*-runner.jar | ||
#!build/lib/* | ||
#!build/quarkus-app/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
docs-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Docs Update | ||
run: docker-compose -f docker-compose-deploy.yml run --rm deploy /bin/builder.bash deploy-docs | ||
env: | ||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
## Build project | ||
|
||
Binary using Native Image | ||
```bash | ||
$ ./gradlew build -Dquarkus.package.type=native &&\ | ||
./build/dns-proxy-server-*-runner --server-port 8053 | ||
``` | ||
|
||
CD | ||
``` | ||
docker-compose build build-frontend | ||
``` | ||
|
||
|
||
## Generate binaries | ||
``` | ||
native-image -H:+ReportExceptionStackTraces -H:Class=com.mageddo.dnsproxyserver.App build/dns-proxy-server-3.0.0-alpha.jar | ||
``` | ||
libfreetype-dev | ||
sudo apt-get install build-essential | ||
|
||
|
||
|
||
# Drafts | ||
|
||
## Run a container for testing | ||
|
||
``` | ||
docker run --rm -it --hostname nginx.dev -e 'HOSTNAMES=nginx.com.br' nginx:1.15 bash | ||
``` | ||
## x | ||
```bash | ||
docker-compose -f docker-compose-alpha.yml rm &&\ | ||
docker-compose -f docker-compose-alpha.yml build &&\ | ||
docker-compose -f docker-compose-alpha.yml run -T --rm arm7x86 | ||
``` | ||
|
||
Generate json reflect for all project | ||
|
||
``` | ||
$ ./gradlew shadowJar | ||
$ mkdir reflect &&\ | ||
$JAVA_HOME/bin/java -agentlib:native-image-agent=config-output-dir=./reflect -jar build/libs/dns-proxy-server*all.jar | ||
/home/typer/Downloads/dns-proxy-server-linux-amd64-2.19.5/dns-proxy-server -default-dns=false -server-port=5481 -web-server-port=5381 | ||
--conf-path /tmp/xpto.json | ||
``` | ||
|
||
|
||
``` | ||
nslookup -po=8053 google.com 127.0.0.1 | ||
-Djava.net.preferIPv4Stack=true | ||
docker network create -d bridge shibata | ||
com.github.dockerjava.core.command.ConnectToNetworkCmdImpl | ||
``` | ||
|
||
Configurar reflection de classes third party | ||
``` | ||
./gradlew build -Dquarkus.package.type=uber-jar | ||
java -cp './build/dns-proxy-server-3.0.0-alpha-runner.jar:../annotation-processing-tools/reflection-config-generator/build/libs/reflection-config-generator-2.4.3-all.jar' nativeimage.core.thirdparty.Main 'com.github.dockerjava.core.command' tmp.json | ||
``` | ||
|
||
|
||
docker-compose -f docker-compose-tmp.yml up --build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
FROM docker.io/defreitas/tools_graalvm-22.3_java-19_debian-9:0.1.1 AS BUILDER | ||
COPY ./ /app | ||
WORKDIR /app | ||
RUN ./gradlew clean build -Dquarkus.package.type=native -i &&\ | ||
cd build &&\ | ||
ls -lha &&\ | ||
mkdir -p artifacts &&\ | ||
mv $(ls -p ./ | grep -v / | grep dns-proxy-server) ./artifacts/ | ||
|
||
FROM debian:10-slim | ||
ADD build/dns-proxy-server-linux-amd64*.tgz /app/ | ||
COPY --from=BUILDER /app/build/artifacts/* /app/dns-proxy-server | ||
WORKDIR /app | ||
LABEL dps.container=true | ||
VOLUME ["/var/run/docker.sock", "/var/run/docker.sock"] | ||
CMD ["bash", "-c", "/app/dns-proxy-server"] | ||
ENTRYPOINT "/app/dns-proxy-server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM arm32v7/debian:10-slim | ||
COPY ./ /building | ||
WORKDIR /building | ||
RUN ./gradlew build nativeImage | ||
ENTRYPOINT "/bin/sh" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:12-alpine AS FRONTEND | ||
COPY app /app | ||
WORKDIR /app | ||
ENV PUBLIC_URL=/static | ||
RUN npm install &&\ | ||
npm run build &&\ | ||
rm -f `find ./build -name *.map` | ||
|
||
FROM scratch AS ARTIFACTS | ||
COPY --from=FRONTEND /app/build /static | ||
ENTRYPOINT cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM docker.io/defreitas/tools-generic-cd:0.2.1 | ||
COPY . /app | ||
COPY ./builder.bash /bin/builder.bash | ||
WORKDIR /app |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM openjdk:17-slim | ||
COPY ./build/dns-proxy-server-*-alpha-runner.jar /app/dns-proxy-server.jar | ||
COPY conf/ /app/conf/ | ||
RUN #mkdir /app/conf | ||
WORKDIR /app | ||
ENTRYPOINT ["java", "-jar", "/app/dns-proxy-server.jar", "--log-level", "DEBUG"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.