You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* - Read proxy env variables and config settings
- Define a function to test that a given path is an active UDS
* Expand paths to the OS user's home directory if they start with "~/" or "%USERPROFILE%\".
* Switch from using "os/user" and `user.Current()` for finding the OS user's home dir, to using "os" and `os.UserHomeDir()`. It requires Go 1.12+.
* Use the UNIX Domain Socket when making connections
* Add SRC_PROXY_SOCKET to the usage output, and remove config settings for a proxy URL.
* Document expandHomeDir function
* Add support for HTTP(S) and SOCKS5 proxies
* Mollify tests
* Add tests
* Refactor: move the proxy handling to a separate file.
* Add tests for a UNIX Domain Socket.
* Fix analysis of url schemes
* Ad tests for socks proxies in the config
* SOCKS proxies work OOTB, so remove the manual dialing for them.
* Use `tls.HandshakeContext`
* - add a proxy test script
- remove "endpoint" from all of the proxy names. The environment variable is now "SRC_PROXY"
- clean up the http(s) proxy dialing code. Experiemented with using http.Request instead of spelling out the CONNECT request manually, but it had enough quircks that I went back to spelling it out manually.
- Add more desriptive messages to the socket config test.
* fix socket test by shortening the length of the file path - UNIX socket paths need to be less than 108-ish characters.
* Fix parameter capitalization
* Add comment about th UDS path length to main_test.go
* Fix formatting in usage message
* Whoops; meant to use `w` instead of `v`! Thanks for catching that.
Co-authored-by: Camden Cheek <[email protected]>
* Whoops; meant to use `w` instead of `v`! Thanks for catching that.
Co-authored-by: Camden Cheek <[email protected]>
* Update comment about InsecureSkipVerify
* Make CHANGELOG entry
---------
Co-authored-by: Camden Cheek <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,10 @@ All notable changes to `src-cli` are documented in this file.
11
11
12
12
## Unreleased
13
13
14
+
### Added
15
+
16
+
- Support HTTP(S), SOCKS5, and UNIX Domain Socket proxies via SRC_PROXY environment variable. [#1120](https://github.com/sourcegraph/src-cli/pull/1120)
fmt.Fprintf(out, "⚠️ Warning: Configuring src with a JSON file is deprecated. Please migrate to using the env vars SRC_ENDPOINTand SRC_ACCESS_TOKEN instead, and then remove %s. See https://github.com/sourcegraph/src-cli#readme for more information.\n", cfg.ConfigFilePath)
84
+
fmt.Fprintf(out, "⚠️ Warning: Configuring src with a JSON file is deprecated. Please migrate to using the env vars SRC_ENDPOINT, SRC_ACCESS_TOKEN, and SRC_PROXY instead, and then remove %s. See https://github.com/sourcegraph/src-cli#readme for more information.\n", cfg.ConfigFilePath)
Copy file name to clipboardExpand all lines: cmd/src/login_test.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ func TestLogin(t *testing.T) {
49
49
iferr!=cmderrors.ExitCode1 {
50
50
t.Fatal(err)
51
51
}
52
-
wantOut:="⚠️ Warning: Configuring src with a JSON file is deprecated. Please migrate to using the env vars SRC_ENDPOINTand SRC_ACCESS_TOKEN instead, and then remove f. See https://github.com/sourcegraph/src-cli#readme for more information.\n\n❌ Problem: No access token is configured.\n\n🛠 To fix: Create an access token at https://example.com/user/settings/tokens, then set the following environment variables:\n\n SRC_ENDPOINT=https://example.com\n SRC_ACCESS_TOKEN=(the access token you just created)\n\n To verify that it's working, run this command again."
52
+
wantOut:="⚠️ Warning: Configuring src with a JSON file is deprecated. Please migrate to using the env vars SRC_ENDPOINT, SRC_ACCESS_TOKEN, and SRC_PROXY instead, and then remove f. See https://github.com/sourcegraph/src-cli#readme for more information.\n\n❌ Problem: No access token is configured.\n\n🛠 To fix: Create an access token at https://example.com/user/settings/tokens, then set the following environment variables:\n\n SRC_ENDPOINT=https://example.com\n SRC_ACCESS_TOKEN=(the access token you just created)\n\n To verify that it's working, run this command again."
0 commit comments