Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
Language: Cpp
BasedOnStyle: WebKit
AlignAfterOpenBracket: BlockIndent
AlignEscapedNewlines: DontAlign
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: WithoutElse
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Attach
ColumnLimit: 80
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^".*"$'
Priority: 1
- Regex: "^<std.*>$"
Priority: 3
- Regex: "^<.*>$"
Priority: 2
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Right
QualifierAlignment: Left
SeparateDefinitionBlocks: Always
SpaceAfterCStyleCast: true
PenaltyReturnTypeOnItsOwnLine: 240
51 changes: 51 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
FormatStyle: file
UseColor: true
Checks:
- bugprone-*
- concurrency-*
- misc-*
- performance-*
- readability-*
- -clang-analyzer-valist.Uninitialized
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
- -bugprone-easily-swappable-parameters
- -bugprone-multi-level-implicit-pointer-conversion
- -readability-identifier-length
- -readability-magic-numbers
- -misc-include-cleaner
- -bugprone-sizeof-container
- -bugprone-multiple-statement-macro
CheckOptions:
- key: bugprone-argument-comment.StrictMode
value: true
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
value: false
- key: bugprone-reserved-identifier.AllowedIdentifiers
value: "[^_].*"
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
value: false
- key: readability-function-cognitive-complexity.IgnoreMacros
value: true
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
value: false
- key: readability-inconsistent-declaration-parameter-name.Strict
value: true
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
12 changes: 12 additions & 0 deletions .cmake-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"format": {
"autosort": true,
"command_case": "lower"
},
"markup": {
"first_comment_is_literal": true
},
"lint": {
"disabled_codes": ["C0103", "C0301", "C0307", "E1120", "R0915"]
}
}
18 changes: 18 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2",
"allowCompoundWords": true,
"dictionaryDefinitions": [
{
"name": "project",
"path": "misc/dictionary.txt",
"addWords": true
}
],
"dictionaries": ["project"],
"ignorePaths": [
"**/CMakeLists.txt",
"**/*.yml",
"**/*.nix",
"**/iwyu_mappings.yml"
]
}
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80

[{*.{cpp,h,hpp}}]
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 72
22 changes: 14 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees:

assignees:
---

**Describe the bug**
Expand All @@ -14,6 +13,7 @@ A clear and concise description of what the bug is.
**To Reproduce**

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -29,13 +29,19 @@ A clear and concise description of what actually happened.

**Logs**

If applicable, add full logs of errors and outputs to help explain your problem. Preferabbly, you can also [increase the verbosity](https://github.com/aws-samples/aws-iot-securetunneling-localproxy#options-set-via-command-line-arguments), for example to enable debug logs for the localproxy, you can use the cli option `-v 6`
If applicable, add full logs of errors and outputs to help explain your problem.
Preferabbly, you can also
[increase the verbosity](https://github.com/aws-samples/aws-iot-securetunneling-localproxy#options-set-via-command-line-arguments),
for example to enable debug logs for the localproxy, you can use the cli option
`-v 6`

**Environment (please complete the following information):**
- OS: [e.g. Ubuntu]
- Version [e.g. 16]
- Architecture: [e.g. x86-64 or x86-32]
- Localproxy commit: [e.g. [8980ea8e0190c7e8fd942f2bce8bfc01aa6a6a52](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/8980ea8e0190c7e8fd942f2bce8bfc01aa6a6a52)]

- OS: [e.g. Ubuntu]
- Version [e.g. 16]
- Architecture: [e.g. x86-64 or x86-32]
- Localproxy commit: [e.g.
[8980ea8e0190c7e8fd942f2bce8bfc01aa6a6a52](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/8980ea8e0190c7e8fd942f2bce8bfc01aa6a6a52)]

**Additional context**

Expand Down
37 changes: 20 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe the solution you'd like** A clear and concise description of what you
want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**Additional context** Add any other context or screenshots about the feature
request here.

**Impact**
How would this feature impact the project? Who would benefit from this feature?
**Impact** How would this feature impact the project? Who would benefit from
this feature?

**Implementation ideas (optional)**
If you have any ideas on how this could be implemented, please share them here.
**Implementation ideas (optional)** If you have any ideas on how this could be
implemented, please share them here.

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

**Are you willing to work on this feature?**

- [ ] Yes, I'm willing to submit a PR for this feature
- [ ] No, I'm just suggesting an idea

**Checklist**

- [ ] I have searched the existing issues to make sure this is not a duplicate
- [ ] I have provided all the necessary information for this feature request
- [ ] I understand that this is just a request and may not be implemented since Local Proxy is just a reference implementation for AWS IOT Secure Tunneling
- [ ] I understand that this is just a request and may not be implemented since
Local Proxy is just a reference implementation for AWS IOT Secure
Tunneling

<!-- Thank you for your feature request! We appreciate your input in making our project better. -->
<!-- Thank you for your feature request! We appreciate your input in making our project better. -->
2 changes: 1 addition & 1 deletion .github/docker-images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ RUN HOME_DIR=/root \
&& bash ${HOME_DIR}/oss-compliance/generate-oss-compliance.sh ${HOME_DIR} \
&& rm -rf ${HOME_DIR}/oss-compliance*

ENTRYPOINT ["/root/bin/localproxy"]
ENTRYPOINT ["/root/bin/localproxy"]
48 changes: 24 additions & 24 deletions .github/docker-images/base-images/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM amazonlinux:2023 as base
# Install Prerequisites

RUN yum check-update; yum upgrade -y && \
yum install -y git boost-devel autoconf automake libatomic perl \
wget libtool make gcc-c++ unzip cmake3 python-devel openssl-devel which
yum install -y git boost-devel autoconf automake libatomic perl \
wget libtool make gcc-c++ unzip cmake3 python-devel openssl-devel which

# Install Dependencies

Expand All @@ -20,34 +20,34 @@ RUN wget https://www.openssl.org/source/openssl-3.0.12.tar.gz \

WORKDIR /home/dependencies
RUN wget https://github.com/madler/zlib/archive/v1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz -O /tmp/boost_1_87_0.tar.gz && \
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh && \
./b2 install link=static
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone --branch v3.7.0 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
46 changes: 23 additions & 23 deletions .github/docker-images/base-images/debian-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ FROM ${OS} AS base
# Install Prerequisites

RUN apt update && apt upgrade -y && \
apt install -y git libboost-all-dev autoconf automake \
wget libtool curl make g++ unzip cmake libssl-dev python3
apt install -y git libboost-all-dev autoconf automake \
wget libtool curl make g++ unzip cmake libssl-dev python3
# Install Dependencies

RUN mkdir /home/dependencies
Expand All @@ -20,34 +20,34 @@ RUN wget https://www.openssl.org/source/openssl-3.0.12.tar.gz \

WORKDIR /home/dependencies
RUN wget https://github.com/madler/zlib/archive/v1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz -O /tmp/boost_1_87_0.tar.gz && \
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh && \
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone --branch v3.7.0 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
4 changes: 2 additions & 2 deletions .github/docker-images/base-images/fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ RUN wget https://github.com/madler/zlib/archive/v1.2.13.tar.gz -O /tmp/zlib-1.2.

WORKDIR /home/dependencies
RUN wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz -O /tmp/boost_1_87_0.tar.gz && \
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
tar xzvf /tmp/boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh --with-libraries=system,log,thread,program_options,date_time,filesystem,chrono,regex,atomic && \
./b2 install link=static

Expand Down
Loading
Loading