File tree Expand file tree Collapse file tree 10 files changed +271
-116
lines changed Expand file tree Collapse file tree 10 files changed +271
-116
lines changed Original file line number Diff line number Diff line change
1
+ root = true
2
+
3
+ [* ]
4
+ indent_style = tab
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{* .md,* .yml,* .lua} ]
12
+ indent_style = space
13
+ indent_size = 2
14
+
15
+ [* .md ]
16
+ trim_trailing_whitespace = false
17
+
18
+ [Makefile ]
19
+ indent_style = tab
20
+ indent_size = 4
Original file line number Diff line number Diff line change
1
+ # Treat all Go files in this repo as binary, with no git magic updating
2
+ # line endings. Windows users contributing to Go will need to use a
3
+ # modern version of git and editors capable of LF line endings.
4
+
5
+ * .go - text diff =golang eol =lf
6
+
7
+
8
+ # Apply override to all files in the directory
9
+ * .md linguist-detectable eol =lf
10
+
11
+ # Common settings that generally should always be used with your language specific settings
12
+
13
+ # Auto detect text files and perform LF normalization
14
+ * text =auto
15
+
16
+ #
17
+ # The above will handle all files NOT found below
18
+ #
19
+
20
+ # Documents
21
+ * .bibtex text diff =bibtex
22
+ * .doc diff =astextplain
23
+ * .DOC diff =astextplain
24
+ * .docx diff =astextplain
25
+ * .DOCX diff =astextplain
26
+ * .dot diff =astextplain
27
+ * .DOT diff =astextplain
28
+ * .pdf diff =astextplain
29
+ * .PDF diff =astextplain
30
+ * .rtf diff =astextplain
31
+ * .RTF diff =astextplain
32
+ * .md text diff =markdown
33
+ * .mdx text diff =markdown
34
+ * .tex text diff =tex
35
+ * .adoc text
36
+ * .textile text
37
+ * .mustache text
38
+ * .csv text eol =crlf
39
+ * .tab text
40
+ * .tsv text
41
+ * .txt text
42
+ * .sql text
43
+ * .epub diff =astextplain
44
+
45
+ # Graphics
46
+ * .png binary
47
+ * .jpg binary
48
+ * .jpeg binary
49
+ * .gif binary
50
+ * .tif binary
51
+ * .tiff binary
52
+ * .ico binary
53
+ # SVG treated as text by default.
54
+ * .svg text
55
+ # If you want to treat it as binary,
56
+ # use the following line instead.
57
+ # *.svg binary
58
+ * .eps binary
59
+
60
+ # Scripts
61
+ * .bash text eol =lf
62
+ * .fish text eol =lf
63
+ * .sh text eol =lf
64
+ * .zsh text eol =lf
65
+ # These are explicitly windows files and should use crlf
66
+ * .bat text eol =crlf
67
+ * .cmd text eol =crlf
68
+ * .ps1 text eol =crlf
69
+
70
+ # Serialisation
71
+ * .json text
72
+ * .toml text
73
+ * .xml text
74
+ * .yaml text
75
+ * .yml text
76
+
77
+ # Archives
78
+ * .7z binary
79
+ * .gz binary
80
+ * .tar binary
81
+ * .tgz binary
82
+ * .zip binary
83
+
84
+ # Text files where line endings should be preserved
85
+ * .patch - text
86
+
87
+ #
88
+ # Exclude files from exporting
89
+ #
90
+
91
+ .gitattributes export-ignore
92
+ .gitignore export-ignore
93
+ .gitkeep export-ignore
94
+
Original file line number Diff line number Diff line change 1
1
name : Go
2
2
on : [push]
3
3
jobs :
4
-
5
4
build :
6
5
name : Build
7
6
runs-on : ubuntu-latest
8
7
steps :
8
+ - name : Set up Go 1.20
9
+ uses : actions/setup-go@v1
10
+ with :
11
+ go-version : 1.20
12
+ id : go
9
13
10
- - name : Set up Go 1.16
11
- uses : actions/setup-go@v1
12
- with :
13
- go-version : 1.16
14
- id : go
15
-
16
- - name : Check out code into the Go module directory
17
- uses : actions/checkout@v1
14
+ - name : Check out code into the Go module directory
15
+ uses : actions/checkout@v1
18
16
19
- - name : Build
20
- run : make build
17
+ - name : Build
18
+ env :
19
+ GOOS : windows
20
+ run : go build -o wsl2-ssh-bridge.exe -ldflags -H=windowsgui main.go
21
21
22
- - name : Upload artifact
23
- uses : actions/upload-artifact@v1.0.0
24
- with :
25
- # Artifact Name
26
- name : wsl2-ssh-pageant .exe
27
- # The directory containing files to upload.
28
- path : wsl2-ssh-pageant .exe
22
+ - name : Upload artifact
23
+ uses : actions/upload-artifact@v1.0.0
24
+ with :
25
+ # Artifact Name
26
+ name : wsl2-ssh-bridge .exe
27
+ # The directory containing files to upload.
28
+ path : wsl2-ssh-bridge .exe
Original file line number Diff line number Diff line change 1
1
{
2
2
"recommendations" : [
3
- " ms-vscode.makefile-tools" ,
4
- " yzhang.markdown-all-in-one" ,
5
- " davidanson.vscode-markdownlint" ,
6
- " streetsidesoftware.code-spell-checker" ,
7
- " golang.go"
8
- ]
3
+ " bierner.markdown-emoji" ,
4
+ " bierner.markdown-preview-github-styles" ,
5
+ " davidanson.vscode-markdownlint" ,
6
+ " editorconfig.editorconfig" ,
7
+ " golang.go" ,
8
+ " ms-vscode.makefile-tools" ,
9
+ " streetsidesoftware.code-spell-checker" ,
10
+ " yzhang.markdown-all-in-one" ,
11
+ ]
9
12
}
Original file line number Diff line number Diff line change 1
1
{
2
+ "[go.mod]" : {
3
+ "editor.defaultFormatter" : " golang.go"
4
+ },
5
+ "[go]" : {
6
+ "editor.defaultFormatter" : " golang.go"
7
+ },
8
+ "[markdown]" : {
9
+ "editor.defaultFormatter" : " DavidAnson.vscode-markdownlint" ,
10
+ "editor.quickSuggestions" : {
11
+ "comments" : " on" ,
12
+ "other" : " on" ,
13
+ "strings" : " on"
14
+ },
15
+ "editor.wordWrap" : " off" ,
16
+ "files.trimTrailingWhitespace" : false
17
+ },
18
+ "cSpell.enabled" : true ,
19
+ "cSpell.spellCheckOnlyWorkspaceFiles" : true ,
2
20
"cSpell.words" : [
21
+ " apenwarr" ,
22
+ " Basepath" ,
3
23
" benpye" ,
24
+ " COPYDATA" ,
25
+ " fixconsole" ,
26
+ " hwnd" ,
27
+ " killagent" ,
28
+ " logfile" ,
4
29
" nohup" ,
5
30
" setsid" ,
6
31
" simlink" ,
7
32
" socat" ,
33
+ " winio" ,
8
34
" Yubico's" ,
9
- " Yubikey" ,
10
- " killagent" ,
11
- ]
35
+ " Yubikey"
36
+ ],
37
+ "editor.formatOnSave" : true ,
38
+ "go.autocompleteUnimportedPackages" : true ,
39
+ "go.formatTool" : " goformat" ,
40
+ "go.toolsManagement.autoUpdate" : true ,
41
+ "go.useLanguageServer" : true ,
42
+ "go.vetFlags" : [
43
+ " -unsafeptr=false"
44
+ ],
45
+ "gopls" : {
46
+ "analyses" : {
47
+ "unsafeptr" : false
48
+ }
49
+ },
50
+ "markdownlint.config" : {
51
+ "line-length" : {
52
+ "code_blocks" : false ,
53
+ "tables" : false
54
+ },
55
+ "no-duplicate-heading" : {
56
+ "siblings_only" : true
57
+ },
58
+ "no-trailing-punctuation" : {
59
+ "punctuation" : " .,;:!。,;:!?"
60
+ }
61
+ },
62
+ "markdownlint.run" : " onSave"
12
63
}
Original file line number Diff line number Diff line change
1
+ all : listen
1
2
2
3
build :
3
- GOOS=windows go build -o wsl2-ssh-pageant.exe -ldflags -H=windowsgui main.go
4
+ @echo " Building wsl2-ssh-bridge..."
5
+ @GOOS=windows go build -o wsl2-ssh-bridge.exe -ldflags -H=windowsgui main.go
4
6
7
+ SSH_PATH := "${USERPROFILE}/.ssh/"
5
8
install : build
6
- mv wsl2-ssh-pageant.exe ~ /.ssh/
9
+ @echo " Installing wsl2-ssh-bridge..."
10
+ @mkdir -p " ${SSH_PATH} "
11
+ @mv wsl2-ssh-bridge.exe " ${SSH_PATH} "
7
12
13
+ IS_INSTALLED := $(shell [ -e where socat > NUL 2>&1 ] && echo 0 || echo 1)
8
14
listen : build
9
- socat UNIX-LISTEN:ssh.sock,fork EXEC:./wsl2-ssh-pageant.exe
15
+ @echo " Attempting to establish WSL2/SSH Bridge..."
16
+ ifeq ($(IS_INSTALLED ) , 0)
17
+ @socat UNIX-LISTEN:ssh.sock,fork EXEC:"${SSH_PATH}/wsl2-ssh-bridge.exe"
18
+ @echo "WSL2/SSH Bridge has been successfully established!"
19
+ else
20
+ @echo "[ERROR]: Please install socat first!"
21
+ endif
22
+
You can’t perform that action at this time.
0 commit comments