Skip to content

Commit 8f89000

Browse files
checkpoint
1 parent 0dbfff8 commit 8f89000

26 files changed

+3827
-198
lines changed

PROJECTS/Aenebris/.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
.stack-work
1+
# Haskell build artifacts
2+
.stack-work/
3+
dist/
4+
dist-newstyle/
5+
cabal.project.local
6+
cabal.project.local~
7+
.HTF/
8+
.ghc.environment.*
9+
10+
# Editor files
211
*.swp
312
*.swo
413
*~
514
.DS_Store
615

16+
# Test certificates (self-signed, regenerate with script)
17+
examples/certs/
18+
19+
# Logs
20+
*.log
21+
722
# Private progress tracking
823
PROGRESS.md
924
decisions.md

PROJECTS/Aenebris/.style.yapf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[style]
2+
based_on_style = pep8
3+
column_limit = 74
4+
indent_width = 4
5+
continuation_indent_width = 4
6+
indent_closing_brackets = false
7+
dedent_closing_brackets = true
8+
indent_blank_lines = false
9+
spaces_before_comment = 2
10+
spaces_around_power_operator = false
11+
spaces_around_default_or_named_assign = true
12+
space_between_ending_comma_and_closing_bracket = false
13+
space_inside_brackets = false
14+
spaces_around_subscript_colon = true
15+
blank_line_before_nested_class_or_def = false
16+
blank_line_before_class_docstring = false
17+
blank_lines_around_top_level_definition = 2
18+
blank_lines_between_top_level_imports_and_variables = 2
19+
blank_line_before_module_docstring = false
20+
split_before_logical_operator = true
21+
split_before_first_argument = true
22+
split_before_named_assigns = true
23+
split_complex_comprehension = true
24+
split_before_expression_after_opening_paren = false
25+
split_before_closing_bracket = true
26+
split_all_comma_separated_values = true
27+
split_all_top_level_comma_separated_values = false
28+
coalesce_brackets = false
29+
each_dict_entry_on_separate_line = true
30+
allow_multiline_lambdas = false
31+
allow_multiline_dictionary_keys = false
32+
split_penalty_import_names = 0
33+
join_multiple_lines = false
34+
align_closing_bracket_with_visual_indent = true
35+
arithmetic_precedence_indication = false
36+
split_penalty_for_added_line_split = 275
37+
use_tabs = false
38+
split_before_dot = false
39+
split_arguments_when_comma_terminated = true
40+
i18n_function_call = ['_', 'N_', 'gettext', 'ngettext']
41+
i18n_comment = ['# Translators:', '# i18n:']
42+
split_penalty_comprehension = 80
43+
split_penalty_after_opening_bracket = 280
44+
split_penalty_before_if_expr = 0
45+
split_penalty_bitwise_operator = 290
46+
split_penalty_logical_operator = 0

PROJECTS/Aenebris/Makefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Ᾰenebris Makefile - Common development commands
2+
3+
.PHONY: help build run logs stop restart clean test backend kill-all
4+
5+
help:
6+
@echo "Ᾰenebris Development Commands:"
7+
@echo ""
8+
@echo " make build - Build the project"
9+
@echo " make run - Start Ᾰenebris proxy"
10+
@echo " make logs - Watch logs in real-time"
11+
@echo " make stop - Stop the proxy"
12+
@echo " make restart - Restart the proxy"
13+
@echo " make clean - Clean build artifacts"
14+
@echo ""
15+
@echo " make backend - Start test backend (port 8000)"
16+
@echo " make test - Run tests (when implemented)"
17+
@echo " make kill-all - Kill proxy + backend"
18+
@echo ""
19+
20+
build:
21+
@echo "Building Ᾰenebris..."
22+
@stack build
23+
24+
run:
25+
@echo "Starting Ᾰenebris on port 8081..."
26+
@nohup stack run examples/config.yaml > aenebris.log 2>&1 &
27+
@sleep 2
28+
@echo "Proxy started! PID: $$(pgrep -f 'aenebris examples' | head -1)"
29+
@echo "Run 'make logs' to watch output"
30+
31+
logs:
32+
@echo "Watching Ᾰenebris logs (Ctrl+C to exit)..."
33+
@tail -f aenebris.log
34+
35+
stop:
36+
@echo "Stopping Ᾰenebris..."
37+
@pkill -f 'aenebris examples' || echo "Proxy not running"
38+
39+
restart: stop
40+
@sleep 1
41+
@make run
42+
43+
clean:
44+
@echo "Cleaning build artifacts..."
45+
@stack clean
46+
@rm -f aenebris.log nohup.out
47+
48+
backend:
49+
@echo "Starting test backend on port 8000..."
50+
@python3 examples/test_backend.py > backend.log 2>&1 &
51+
@sleep 1
52+
@echo "Backend started! PID: $$(pgrep -f test_backend | head -1)"
53+
54+
# Run tests (placeholder for now)
55+
test:
56+
@echo "Running tests..."
57+
@stack test
58+
59+
kill-all:
60+
@echo "Killing all processes..."
61+
@pkill -f 'aenebris examples' || echo "Proxy not running"
62+
@pkill -f test_backend || echo "Backend not running"
63+
@echo "All processes stopped"

PROJECTS/Aenebris/aenebris.cabal

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ library
1919
hs-source-dirs: src
2020
exposed-modules: Aenebris.Proxy
2121
, Aenebris.Config
22+
, Aenebris.Backend
23+
, Aenebris.LoadBalancer
24+
, Aenebris.HealthCheck
25+
, Aenebris.TLS
26+
, Aenebris.Middleware.Security
27+
, Aenebris.Middleware.Redirect
2228
default-language: Haskell2010
2329
build-depends: base >= 4.7 && < 5
2430
, warp >= 3.3
31+
, warp-tls >= 3.4
2532
, wai >= 3.2
2633
, http-types >= 0.12
2734
, http-conduit >= 2.3
@@ -30,6 +37,18 @@ library
3037
, text >= 2.0
3138
, yaml >= 0.11
3239
, aeson >= 2.0
40+
, async >= 2.2
41+
, stm >= 2.5
42+
, time >= 1.9
43+
, containers >= 0.6
44+
, vector >= 0.12
45+
, tls >= 2.1
46+
, x509 >= 1.7
47+
, x509-store >= 1.6
48+
, x509-validation >= 1.6
49+
, case-insensitive >= 1.2
50+
, directory >= 1.3
51+
, data-default-class >= 0.1
3352
ghc-options: -Wall
3453
-Wcompat
3554
-Widentities

PROJECTS/Aenebris/app/Main.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ main = do
2020

2121
putStrLn $ "Loading configuration from: " ++ configPath
2222

23-
-- Load configuration
2423
result <- loadConfig configPath
2524
case result of
2625
Left err -> do
@@ -29,18 +28,20 @@ main = do
2928
exitFailure
3029

3130
Right config -> do
32-
-- Validate configuration
3331
case validateConfig config of
3432
Left err -> do
3533
hPutStrLn stderr $ "ERROR: Invalid configuration"
3634
hPutStrLn stderr err
3735
exitFailure
3836

3937
Right () -> do
40-
putStrLn "Configuration loaded and validated successfully"
38+
putStrLn "Configuration loaded and validated successfully"
4139

42-
-- Create HTTP client manager
40+
-- Create HTTP client manager with connection pooling
4341
manager <- newManager defaultManagerSettings
4442

43+
-- Initialize proxy state (load balancers + health checkers)
44+
proxyState <- initProxyState config manager
45+
4546
-- Start the proxy
46-
startProxy config manager
47+
startProxy proxyState

PROJECTS/Aenebris/docs/LICENSE

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)