Documentation ¶
Index ¶
- func ExportExchangePayload() string
- func GetBuildInfo() string
- func GetPacketTunnelDNSResolverIPv4Address() string
- func GetPacketTunnelDNSResolverIPv6Address() string
- func GetPacketTunnelMTU() int
- func HomepageFilePath(rootDataDirectoryPath string) string
- func ImportExchangePayload(payload string) bool
- func NoticeUserLog(message string)
- func NoticesFilePath(rootDataDirectoryPath string) string
- func OldNoticesFilePath(rootDataDirectoryPath string) string
- func ReconnectTunnel()
- func SendFeedback(...) error
- func SetDynamicConfig(newSponsorID, newAuthorizationsList string)
- func Start(configJson, embeddedServerEntryList, embeddedServerEntryListFilename string, ...) error
- func Stop()
- func UpgradeDownloadFilePath(rootDataDirectoryPath string) string
- func WriteRuntimeProfiles(outputDirectory string, ...)
- type PsiphonProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportExchangePayload ¶
func ExportExchangePayload() string
ExportExchangePayload creates a payload for client-to-client server connection info exchange.
ExportExchangePayload will succeed only when Psiphon is running, between Start and Stop.
The return value is a payload that may be exchanged with another client; when "", the export failed and a diagnostic has been logged.
func GetPacketTunnelDNSResolverIPv4Address ¶ added in v1.0.5
func GetPacketTunnelDNSResolverIPv4Address() string
func GetPacketTunnelDNSResolverIPv6Address ¶ added in v1.0.5
func GetPacketTunnelDNSResolverIPv6Address() string
func GetPacketTunnelMTU ¶ added in v1.0.5
func GetPacketTunnelMTU() int
func HomepageFilePath ¶
HomepageFilePath returns the path where homepage files will be paved.
rootDataDirectoryPath is the configured data root directory.
Note: homepage files will only be paved if UseNoticeFiles is set in the config passed to Start().
func ImportExchangePayload ¶
ImportExchangePayload imports a payload generated by ExportExchangePayload.
If an import occurs when Psiphon is working to establsh a tunnel, the newly imported server entry is prioritized.
The return value indicates a successful import. If the import failed, a a diagnostic notice has been logged.
func NoticeUserLog ¶ added in v1.0.5
func NoticeUserLog(message string)
func NoticesFilePath ¶
NoticesFilePath returns the path where the notices file will be paved.
rootDataDirectoryPath is the configured data root directory.
Note: notices will only be paved if UseNoticeFiles is set in the config passed to Start().
func OldNoticesFilePath ¶
OldNoticesFilePath returns the path where the notices file is moved to when file rotation occurs.
rootDataDirectoryPath is the configured data root directory.
Note: notices will only be paved if UseNoticeFiles is set in the config passed to Start().
func ReconnectTunnel ¶ added in v1.0.5
func ReconnectTunnel()
ReconnectTunnel initiates a reconnect of the current tunnel, if one is running.
func SendFeedback ¶
func SendFeedback(configJson, diagnosticsJson, b64EncodedPublicKey, uploadServer, uploadPath, uploadServerHeaders string) error
Encrypt and upload feedback.
func SetDynamicConfig ¶ added in v1.0.5
func SetDynamicConfig(newSponsorID, newAuthorizationsList string)
SetDynamicConfig overrides the sponsor ID and authorizations fields set in the config passed to Start. SetDynamicConfig has no effect if no Controller is started.
The input newAuthorizationsList is a space-delimited list of base64 authorizations. This is a workaround for gobind type limitations.
func Start ¶
func Start( configJson, embeddedServerEntryList, embeddedServerEntryListFilename string, provider PsiphonProvider, useDeviceBinder, useIPv6Synthesizer bool) error
func UpgradeDownloadFilePath ¶
UpgradeDownloadFilePath returns the path where the downloaded upgrade file will be paved.
rootDataDirectoryPath is the configured data root directory.
Note: upgrades will only be paved if UpgradeDownloadURLs is set in the config passed to Start() and there are upgrades available.
func WriteRuntimeProfiles ¶ added in v1.0.9
func WriteRuntimeProfiles(outputDirectory string, cpuSampleDurationSeconds, blockSampleDurationSeconds int)
WriteRuntimeProfiles writes Go runtime profile information to a set of files in the specified output directory. See common.WriteRuntimeProfiles for more details.
If called before Start, log notices will emit to stderr.