Documentation
¶
Overview ¶
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Copyright (C) 2026 by saba <contact me via issue>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association with this application without prior consent.
Index ¶
- func LookupIPsWithCache(ctx context.Context, host string) ([]net.IP, error)
- func NewOutboundHTTPClient(timeout time.Duration, resolver *Resolver) *http.Client
- func NewOutboundHTTPTransport(timeout time.Duration, resolver *Resolver) *http.Transport
- func OutboundDialer(timeout time.Duration) *net.Dialer
- func ResolveWithCache(ctx context.Context, addr string) (string, error)
- type Options
- type Resolver
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupIPsWithCache ¶
func NewOutboundHTTPClient ¶
func OutboundDialer ¶
OutboundDialer returns a net.Dialer that applies best-effort platform-specific outbound bypass options when the host process provides them via environment variables.
Types ¶
type Options ¶
type Options struct {
DisableCache bool `json:"disable_cache"`
DisableExpire bool `json:"disable_expire"`
CacheTTLSeconds int `json:"cache_ttl_seconds"`
TimeoutMs int `json:"timeout_ms"`
DisableBogusFilter bool `json:"disable_bogus_filter"`
BogusNets []string `json:"bogus_nets"`
Servers []ServerOptions `json:"servers"`
}
func RecommendedClientOptions ¶
func RecommendedClientOptions() Options
RecommendedClientOptions is the built-in target-DNS policy used by the mixed proxy client.
func (Options) Normalized ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func RecommendedClientResolver ¶
func RecommendedClientResolver() *Resolver
RecommendedClientResolver returns the built-in IPv4-only resolver used for client-side public destination lookups such as PAC/geodata downloads.