Skip to content

Commit 7ae18c1

Browse files
committed
feat: init commit
0 parents  commit 7ae18c1

7 files changed

Lines changed: 595 additions & 0 deletions

File tree

.clang-format

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: true
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakBeforeMultilineStrings: true
19+
AlwaysBreakTemplateDeclarations: true
20+
BinPackArguments: true
21+
BinPackParameters: true
22+
BreakBeforeBinaryOperators: None
23+
BreakBeforeBraces: Attach
24+
BreakBeforeTernaryOperators: true
25+
BreakConstructorInitializersBeforeComma: false
26+
ColumnLimit: 100
27+
CommentPragmas: '^ IWYU pragma:'
28+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
29+
ConstructorInitializerIndentWidth: 8
30+
ContinuationIndentWidth: 8
31+
Cpp11BracedListStyle: true
32+
DerivePointerAlignment: false
33+
DisableFormat: false
34+
ExperimentalAutoDetectBinPacking: false
35+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
36+
IndentCaseLabels: false
37+
IndentWidth: 4
38+
IndentWrappedFunctionNames: false
39+
KeepEmptyLinesAtTheStartOfBlocks: true
40+
MacroBlockBegin: ''
41+
MacroBlockEnd: ''
42+
MaxEmptyLinesToKeep: 1
43+
NamespaceIndentation: None
44+
ObjCBlockIndentWidth: 2
45+
ObjCSpaceAfterProperty: false
46+
ObjCSpaceBeforeProtocolList: false
47+
PenaltyBreakBeforeFirstCallParameter: 1
48+
PenaltyBreakComment: 300
49+
PenaltyBreakFirstLessLess: 120
50+
PenaltyBreakString: 1000
51+
PenaltyExcessCharacter: 1000000
52+
PenaltyReturnTypeOnItsOwnLine: 200
53+
PointerAlignment: Left
54+
SpaceAfterCStyleCast: true
55+
SpaceBeforeAssignmentOperators: true
56+
SpaceBeforeParens: ControlStatements
57+
SpaceInEmptyParentheses: false
58+
SpacesBeforeTrailingComments: 2
59+
SpacesInAngles: false
60+
SpacesInContainerLiterals: true
61+
SpacesInCStyleCastParentheses: false
62+
SpacesInParentheses: false
63+
SpacesInSquareBrackets: false
64+
Standard: Auto
65+
TabWidth: 8
66+
UseTab: Never

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: build
2+
on: [ push, pull_request ]
3+
jobs:
4+
build:
5+
runs-on: windows-latest
6+
7+
steps:
8+
- name: setenv
9+
run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV
10+
11+
- uses: actions/checkout@v3
12+
13+
- uses: jwlawson/actions-setup-cmake@v1.13
14+
15+
- name: configure
16+
run: cmake -S . -B build -G"Visual Studio 17 2022"
17+
18+
- name: build
19+
run: cmake --build build --config release
20+
21+
- name: Release
22+
uses: softprops/action-gh-release@v1
23+
if: startsWith(github.ref, 'refs/tags/')
24+
with:
25+
files: build/Release/conpty_proxy.exe

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.cache
2+
build

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
project(conpty_proxy)
4+
5+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6+
7+
add_executable(${PROJECT_NAME} conpty_proxy.c)
8+
9+
if(MSVC)
10+
add_compile_options(/W4 /utf8)
11+
set_property(TARGET ${PROJECT_NAME} PROPERTY
12+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
13+
else()
14+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -municode")
15+
endif()
16+
17+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 xhcoding
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# conpty-proxy
2+
3+
4+
# Pre-Requirements
5+
6+
To run conpty-proxy, you must install:
7+
8+
- Windows 10 Insider build 17733 or later

0 commit comments

Comments
 (0)