Skip to content

Commit 05e4b93

Browse files
authored
Added --connect-timeout (#45)
* Added connect-timeout and tests * Added mdown lint * Fix tests * Use newer golangci-lint * run markdownlint on ubuntu only Closes #43
1 parent 83954fd commit 05e4b93

File tree

20 files changed

+788
-212
lines changed

20 files changed

+788
-212
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
tests:
1313
strategy:
1414
matrix:
15-
go: [stable]
15+
go: [ stable ]
1616
os:
1717
- windows-latest
1818
- macos-latest

.github/workflows/lint.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ jobs:
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v8
2525
with:
26-
version: v2.3.1
27-
26+
version: v2.5.0
27+
- name: markdownlint-cli
28+
if: matrix.os == 'ubuntu-latest'
29+
uses: nosborn/github-action-markdown-cli@v3.5.0
30+
with:
31+
files: .

.markdownlint.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"ul-indent": {
3+
"indent": 4
4+
},
5+
"ul-style": {
6+
"style": "dash"
7+
},
8+
"emphasis-style": {
9+
"style": "asterisk"
10+
},
11+
"no-duplicate-heading": {
12+
"siblings_only": true
13+
},
14+
"no-inline-html": {
15+
"allowed_elements": [
16+
"a",
17+
"p",
18+
"details",
19+
"summary",
20+
"img"
21+
]
22+
},
23+
"no-trailing-spaces": {
24+
"br_spaces": 0
25+
},
26+
"line-length": false,
27+
"no-bare-urls": false,
28+
"link-fragments": false
29+
}

CHANGELOG.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ adheres to [Semantic Versioning][semver].
1111

1212
## [Unreleased]
1313

14+
### Added
15+
16+
- Added `--connect-timeout` command-line argument support. ([#43][#43])
17+
18+
[#43]: https://github.com/ameshkov/gocurl/issues/43
19+
1420
[unreleased]: https://github.com/ameshkov/gocurl/compare/v1.4.9...HEAD
1521

1622
## [1.4.9] - 2025-05-19
1723

1824
### Fixed
1925

20-
* Fixed the issue with `--tls-random` when it's used with `--ech`. ([#38][#38])
26+
- Fixed the issue with `--tls-random` when it's used with `--ech`. ([#38][#38])
2127

2228
[See changes][1.4.9changes].
2329

@@ -31,7 +37,7 @@ adheres to [Semantic Versioning][semver].
3137

3238
### Added
3339

34-
* Added support for `--tls-random` command-line argument. This option is used to
40+
- Added support for `--tls-random` command-line argument. This option is used to
3541
enable TLS Random for TLS ClientHello. ([#35][#35])
3642

3743
[See changes][1.4.8changes].
@@ -46,7 +52,7 @@ adheres to [Semantic Versioning][semver].
4652

4753
### Added
4854

49-
* Added support for `--echgrease` command-line argument. This option is used to
55+
- Added support for `--echgrease` command-line argument. This option is used to
5056
enable ECH Grease for TLS ClientHello.
5157

5258
[See changes][1.4.7changes].
@@ -59,8 +65,8 @@ adheres to [Semantic Versioning][semver].
5965

6066
### Fixed
6167

62-
* Cannot set User Agent via headers. ([#34][#34])
63-
* `--insecure` flag is not respected by DNS upstreams. ([#30][#30])
68+
- Cannot set User Agent via headers. ([#34][#34])
69+
- `--insecure` flag is not respected by DNS upstreams. ([#30][#30])
6470

6571
[See changes][1.4.6changes].
6672

@@ -76,11 +82,11 @@ adheres to [Semantic Versioning][semver].
7682

7783
### Added
7884

79-
* Added `http` and `https` proxies support. ([#31][#31])
85+
- Added `http` and `https` proxies support. ([#31][#31])
8086

8187
### Fixed
8288

83-
* Panic when `--json-output` is specified and failed to read response body.
89+
- Panic when `--json-output` is specified and failed to read response body.
8490

8591
[See changes][1.4.5changes].
8692

@@ -94,10 +100,10 @@ adheres to [Semantic Versioning][semver].
94100

95101
### Changed
96102

97-
* Updated dependenceis.
98-
* `--ech` no more fails when there's no ECH configuration for the domain, it
103+
- Updated dependenceis.
104+
- `--ech` no more fails when there's no ECH configuration for the domain, it
99105
just falls back to regular TLS and prints a warning.
100-
* Use MLKEM for post-quantum key exchange when `--experiment` is used.
106+
- Use MLKEM for post-quantum key exchange when `--experiment` is used.
101107

102108
[See changes][1.4.4changes].
103109

@@ -109,12 +115,12 @@ adheres to [Semantic Versioning][semver].
109115

110116
### Added
111117

112-
* Added support for the `--tls-servername` argument.
118+
- Added support for the `--tls-servername` argument.
113119

114120
### Changed
115121

116-
* Use `http` as the default scheme. ([#27][#27])
117-
* Updated dependencies, now using newer versions of quic-go, dnsproxy, cfcrypto.
122+
- Use `http` as the default scheme. ([#27][#27])
123+
- Updated dependencies, now using newer versions of quic-go, dnsproxy, cfcrypto.
118124

119125
[See changes][1.4.3changes].
120126

@@ -128,8 +134,8 @@ adheres to [Semantic Versioning][semver].
128134

129135
### Added
130136

131-
* Added support for the `--tls-max` argument.
132-
* Added support for the `--ciphers` argument.
137+
- Added support for the `--tls-max` argument.
138+
- Added support for the `--ciphers` argument.
133139

134140
[See changes][1.4.2changes].
135141

@@ -141,14 +147,14 @@ adheres to [Semantic Versioning][semver].
141147

142148
### Added
143149

144-
* Added support for `--ipv4` and `--ipv6` arguments. ([#25][#25])
145-
* Added [a Docker image][dockerimage] for `gocurl`.
150+
- Added support for `--ipv4` and `--ipv6` arguments. ([#25][#25])
151+
- Added [a Docker image][dockerimage] for `gocurl`.
146152

147153
### Fixed
148154

149-
* Fixed a bug introduced in v1.4.0 with `gocurl` not printing the response body
155+
- Fixed a bug introduced in v1.4.0 with `gocurl` not printing the response body
150156
when the protocol is HTTP/2 or HTTP/3. ([#26][#26])
151-
* Fixed unnecessary warning `connection doesn't allow setting of receive buffer
157+
- Fixed unnecessary warning `connection doesn't allow setting of receive buffer
152158
size` when HTTP/3 is used.
153159

154160
[See changes][1.4.1changes].
@@ -167,7 +173,7 @@ adheres to [Semantic Versioning][semver].
167173

168174
### Added
169175

170-
* Added initial WebSocket support. `gocurl` now supports `ws://` and `wss://`
176+
- Added initial WebSocket support. `gocurl` now supports `ws://` and `wss://`
171177
URLs. `-d` can be used to specify initial data to send. ([#17][#17])
172178

173179
[See changes][1.4.0changes].
@@ -182,13 +188,13 @@ adheres to [Semantic Versioning][semver].
182188

183189
### Added
184190

185-
* Added an option to use Post-Quantum secure algorithms for establishing TLS
191+
- Added an option to use Post-Quantum secure algorithms for establishing TLS
186192
connections. This option is hidden under a new `--experiment` flag that is
187193
described in README.md. ([#15][#15])
188194

189195
### Fixed
190196

191-
* Fixed an issue with `--http2` not being able to work together with `--ech`. In
197+
- Fixed an issue with `--http2` not being able to work together with `--ech`. In
192198
addition to that there's also one more change: `gocurl` by default will send
193199
both `h2` and `http/1.1` in TLS ALPN extension and use the protocol selected
194200
by the server. ([#14][#14])
@@ -207,13 +213,13 @@ adheres to [Semantic Versioning][semver].
207213

208214
### Added
209215

210-
* Added `--dns-servers` command-line argument support. Besides regular DNS,
216+
- Added `--dns-servers` command-line argument support. Besides regular DNS,
211217
`gocurl` also supports encrypted DNS, see examples in README.md to learn
212218
more. ([#6][#6])
213219

214220
### Fixed
215221

216-
* TLS state is now printed to the output for ECH-enabled connections. In
222+
- TLS state is now printed to the output for ECH-enabled connections. In
217223
addition to that, much more TLS-related information is printed to the output
218224
including information about TLS certificates. ([#8][#8])
219225

@@ -231,9 +237,9 @@ adheres to [Semantic Versioning][semver].
231237

232238
### Added
233239

234-
* `gocurl` now supports Encrypted Client Hello. Added `--ech` and `--echconfig`
240+
- `gocurl` now supports Encrypted Client Hello. Added `--ech` and `--echconfig`
235241
command-line arguments, see examples in README.md to learn more. ([#3][#3])
236-
* Added `--resolve` command-line argument support. It works similarly to the one
242+
- Added `--resolve` command-line argument support. It works similarly to the one
237243
in `curl` with one important difference: `gocurl` ignores `port` there and
238244
simply returns specified IP addresses for the host. ([#5][#5])
239245

@@ -251,7 +257,7 @@ adheres to [Semantic Versioning][semver].
251257

252258
### Added
253259

254-
* `--connect-to` and `--proxy` now also support HTTP/3. ([#1][#1])
260+
- `--connect-to` and `--proxy` now also support HTTP/3. ([#1][#1])
255261

256262
[See changes][1.0.6changes].
257263

@@ -265,15 +271,15 @@ adheres to [Semantic Versioning][semver].
265271

266272
### Added
267273

268-
* Added the changelog.
274+
- Added the changelog.
269275

270276
### Changed
271277

272-
* Added more debug logging to all request stages.
278+
- Added more debug logging to all request stages.
273279

274280
### Fixed
275281

276-
* Fixed the way `--connect-to` works when a proxy is specified. Before this
282+
- Fixed the way `--connect-to` works when a proxy is specified. Before this
277283
change gocurl could only redirect the proxy connection, but not the one that
278284
goes through proxy. This behavior is now fixed.
279285

@@ -287,7 +293,7 @@ adheres to [Semantic Versioning][semver].
287293

288294
### Fixed
289295

290-
* Fixed the issue with the output being written not to stdout by default.
296+
- Fixed the issue with the output being written not to stdout by default.
291297

292298
[See changes][1.0.4changes].
293299

@@ -299,7 +305,7 @@ adheres to [Semantic Versioning][semver].
299305

300306
### Fixed
301307

302-
* Minor improvements.
308+
- Minor improvements.
303309

304310
[See changes][1.0.3changes].
305311

@@ -311,7 +317,7 @@ adheres to [Semantic Versioning][semver].
311317

312318
### Added
313319

314-
* Automate the release process.
320+
- Automate the release process.
315321

316322
[See changes][1.0.2changes].
317323

@@ -323,7 +329,7 @@ adheres to [Semantic Versioning][semver].
323329

324330
### Fixed
325331

326-
* Logging improvements.
332+
- Logging improvements.
327333

328334
[See changes][1.0.1changes].
329335

@@ -335,6 +341,6 @@ adheres to [Semantic Versioning][semver].
335341

336342
### Added
337343

338-
* The first version with base functionality.
344+
- The first version with base functionality.
339345

340-
[1.0.0]: https://github.com/ameshkov/gocurl/releases/tag/v1.0.0
346+
[1.0.0]: https://github.com/ameshkov/gocurl/releases/tag/v1.0.0

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ release: check-env-release
2626
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-X $(VERSIONPKG).version=$(VERSION)" -o $(BUILDDIR)/$(NAME)$(ext)
2727
cd $(BASE_BUILDDIR) ; $(archiveCmd)
2828

29+
lint:
30+
npx markdownlint-cli .
31+
golangci-lint run
32+
2933
test:
3034
go test -race -v -bench=. ./...
3135

0 commit comments

Comments
 (0)