<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.41.3</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=v0.41.3</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.41.3'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2022-11-04T17:29:12Z</updated>
<entry>
<title>Release share v0.41.3 (2022-11-05)</title>
<updated>2022-11-04T17:29:12Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-11-04T17:29:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=859cc859fa74ddf7a79767114760db1a7840734c'/>
<id>urn:sha1:859cc859fa74ddf7a79767114760db1a7840734c</id>
<content type='text'>
=== Bug fixes

* lib/http: sanitize ServerUrl and request path
* lib/ssh: try both ssh agent and IdentityFile
* ssh/sftp: set FileAttrs.name to filename

===  Enhancements

* lib/ssh: add private key to agent once client connected successfully
* ssh/config: change the method GenerateSigners to Signers
</content>
</entry>
<entry>
<title>lib/http: sanitize ServerUrl and request path</title>
<updated>2022-10-28T04:10:29Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-28T03:42:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=542a11bc463dfaea70ba95fd089b4e1c820f2b38'/>
<id>urn:sha1:542a11bc463dfaea70ba95fd089b4e1c820f2b38</id>
<content type='text'>
This is to fix double slash in case the ServerUrl end with it and the
request path begin with it.
For example, "http://127.0.0.1/" and "/" should send request to
"http://127.0.0.1/" not "http://127.0.0.1//".
</content>
</entry>
<entry>
<title>lib/ssh: add private key to agent once client connected successfully</title>
<updated>2022-10-19T19:15:32Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-19T19:15:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8080dad8f616f5e82a4967de449a97423245cfc2'/>
<id>urn:sha1:8080dad8f616f5e82a4967de449a97423245cfc2</id>
<content type='text'>
In NewClientFromConfig, if Client connect using IdentityFile instead of
agent and its success, we add the private key to agent directly.

Unfortunately, since we did not know which key is being negotiated, we
add all private keys parsed from IdentityFile.
</content>
</entry>
<entry>
<title>ssh/config: change the method GenerateSigners to Signers</title>
<updated>2022-10-19T18:23:23Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-19T17:56:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7fe1efa786c933acf326f5342f714e281f748d48'/>
<id>urn:sha1:7fe1efa786c933acf326f5342f714e281f748d48</id>
<content type='text'>
This is to make the method compatible with ssh.PublicKeysCallback.

Each parsed and unsigned IdentityFile is stored in field PrivateKeys,
replacing the Signers field (which is conflict with method names).
</content>
</entry>
<entry>
<title>lib/ssh: try both ssh agent and IdentityFile</title>
<updated>2022-10-19T16:12:02Z</updated>
<author>
<name>Youfu Zhang</name>
<email>zhangyoufu@gmail.com</email>
</author>
<published>2022-10-19T09:18:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7f9a81a0122582e21046ca22ea522c5abc0400d2'/>
<id>urn:sha1:7f9a81a0122582e21046ca22ea522c5abc0400d2</id>
<content type='text'>
If ~/.ssh/config contains a Host section with IdentityFile directive specified
and SSH_AUTH_SOCK environment variable is also set, but ssh_config
section does not specify "IdentityAgent none" explicitly, the NewClientFromConfig
returns an error saying

  NewClient: ssh: handshake failed: ssh: unable to authenticate, attempted
    methods [none publickey], no supported methods remain.

This changes fix this by dialing remote server twice.

Fix #1
</content>
</entry>
<entry>
<title>ssh/sftp: set FileAttrs.name to filename</title>
<updated>2022-10-18T13:46:28Z</updated>
<author>
<name>Youfu Zhang</name>
<email>1315097+zhangyoufu@users.noreply.github.com</email>
</author>
<published>2022-10-18T10:45:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d98f20f12978b42e3a86aa5aba8dfe82483312ba'/>
<id>urn:sha1:d98f20f12978b42e3a86aa5aba8dfe82483312ba</id>
<content type='text'>
Current implementation exposes dirEntry.filename as fs.DirEntry.Name().
However fs.DirEntry.Info().Name() is always empty string.

Fix #2
</content>
</entry>
<entry>
<title>Release share v0.41.2 (2022-10-10)</title>
<updated>2022-10-10T09:02:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-10T09:02:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=90e7dffb1349fdaa1cc883bc8d97e2067f21a3be'/>
<id>urn:sha1:90e7dffb1349fdaa1cc883bc8d97e2067f21a3be</id>
<content type='text'>
=== Bug fixes

* lib/websocket: check for EAGAIN and EINTR when reading raw socket
* lib/websocket: fix possible data race on Client

=== Enhancements

* lib/websocket: cleanup the channel gracefulClose during Close

=== Chores

* lib/websocket: replace handleInvalidData and BadRequest with
  sendClose
* lib/websocket: rewords some comment and package documentation
</content>
</entry>
<entry>
<title>lib/websocket: cleanup the channel gracefulClose during Close</title>
<updated>2022-10-09T17:48:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-09T17:48:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=1465d832f247cf0c94357810c7d958ed165b554f'/>
<id>urn:sha1:1465d832f247cf0c94357810c7d958ed165b554f</id>
<content type='text'>
When calling Close, we initialize the internal channel gracefulClose
so the client can check the close response from server on another
goroutine serve() and signal back to Close to continue the closing
process.

This channel is never closed and nil-ed again after Close which
may cause resource leaks.

While at it, use sendClose to minimize duplicate code.
</content>
</entry>
<entry>
<title>lib/websocket: check for EAGAIN and EINTR when reading raw socket</title>
<updated>2022-10-09T17:48:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-09T17:38:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=5421759721b8da41db483661a6b1bdf175119bed'/>
<id>urn:sha1:5421759721b8da41db483661a6b1bdf175119bed</id>
<content type='text'>
This fix tests that sometimes fail when running with -count=X, where
X &gt; 1,

  $ go test -race -count=30 -timeout=30s ./lib/websocket

Upon inspecting, when client sending larger payload, for example
65536 bytes, server sometimes only read half of them and return an
error "resource temporarily unavailable" or
"interrupted system call".
</content>
</entry>
<entry>
<title>lib/websocket: replace handleInvalidData and BadRequest with sendClose</title>
<updated>2022-10-09T17:48:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-10-08T14:06:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=cd0e8e2f30c067c69bd3daa260cc4387143f6059'/>
<id>urn:sha1:cd0e8e2f30c067c69bd3daa260cc4387143f6059</id>
<content type='text'>
Both of those functions actually call send control CLOSE frame and not
exported.
So, instead of duplicating it, we replace it with sendClose.
</content>
</entry>
</feed>
