test
This commit is contained in:
parent
0937651f67
commit
117ff56d1e
5 changed files with 11 additions and 14 deletions
|
|
@ -40,7 +40,7 @@ async function demonstrateProxyService() {
|
|||
console.log('Working proxy found:', {
|
||||
host: workingProxy.host,
|
||||
port: workingProxy.port,
|
||||
type: workingProxy.type
|
||||
protocol: workingProxy.protocol
|
||||
});
|
||||
|
||||
// 7. Test the proxy
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { createLogger } from '@stock-bot/logger';
|
||||
import { createCache } from '@stock-bot/cache';
|
||||
import createCache, { type CacheProvider } from '@stock-bot/cache';
|
||||
import { HttpClient, ProxyConfig } from '@stock-bot/http-client';
|
||||
import type { CacheProvider } from '@stock-bot/cache';
|
||||
import type { Logger as PinoLogger } from 'pino';
|
||||
|
||||
export interface ProxySource {
|
||||
|
|
@ -163,7 +162,7 @@ export class ProxyService {
|
|||
this.parseHttpProxyList(response.data);
|
||||
|
||||
return proxies.map(proxy => ({
|
||||
type: 'http', // Fixed type to match ProxyConfig interface
|
||||
protocol: source.protocol,
|
||||
host: proxy.host,
|
||||
port: proxy.port,
|
||||
username: proxy.username,
|
||||
|
|
@ -193,7 +192,7 @@ export class ProxyService {
|
|||
const [host, port] = trimmed.split(':');
|
||||
if (host && port && this.isValidIP(host) && this.isValidPort(port)) {
|
||||
proxies.push({
|
||||
type: 'http',
|
||||
protocol: 'http',
|
||||
host: host.trim(),
|
||||
port: parseInt(port.trim())
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue