(advice-add 'straight-vc-git--encode-url :around #'noalias-set-github-mirror)
(defun noalias-set-github-mirror (oldfunc &rest args)
(let ((url (apply oldfunc args)))
(replace-regexp-in-string (rx (group "github.com"))
"github.com.cnpmjs.org" url nil nil 1)))
希望有所帮助