Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: merge inet4_address and inet6_address into address #2432

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
96a8de9
Crazy sekai overturns the small pond
nekohasekai Oct 21, 2024
7686503
Implement TCP and ICMP rejects
nekohasekai Oct 22, 2024
5a1c59c
Implement resolve(server)
nekohasekai Oct 22, 2024
15cc3b8
Implement dns-hijack
nekohasekai Oct 23, 2024
63d8f6d
refactor: Modular inbounds/outbounds
nekohasekai Nov 1, 2024
7d26bac
Remove unused reject methods
nekohasekai Nov 6, 2024
afd341a
Improve rule actions
nekohasekai Nov 6, 2024
7ed10b3
Implement new deprecated warnings
nekohasekai Nov 7, 2024
040a188
Implement udp connect
nekohasekai Nov 7, 2024
f12a294
Migrate bad options to library
nekohasekai Nov 18, 2024
4a611ed
documentation: Remove outdated icons
nekohasekai Nov 6, 2024
6823670
documentation: Update the scheduled removal time of deprecated features
nekohasekai Nov 6, 2024
d297ad4
documentation: Add rule action
nekohasekai Nov 6, 2024
0437ac5
refactor: Modular inbound/outbound manager
nekohasekai Nov 9, 2024
f2ddc58
refactor: Modular network manager
nekohasekai Nov 10, 2024
daf38a8
refactor: Extract services form router
nekohasekai Nov 10, 2024
72239dc
refactor: Platform Interfaces
nekohasekai Nov 11, 2024
f2780d0
Merge route options to route actions
nekohasekai Nov 11, 2024
7819f13
Add `network_[type/is_expensive/is_constrained]` rule items
nekohasekai Nov 11, 2024
65cb225
documentation: Merge route options to route actions
nekohasekai Nov 11, 2024
53e227a
Add multi network dialing
nekohasekai Nov 12, 2024
292fcde
documentation: Remove unused titles
nekohasekai Nov 12, 2024
f3bf440
Refactor multi networks strategy
nekohasekai Nov 13, 2024
c9f9d9e
Add `dns.cache_capacity`
nekohasekai Nov 14, 2024
6a5943f
Add override destination to route options
nekohasekai Nov 14, 2024
48d102a
documentation: Fix typo
nekohasekai Nov 16, 2024
b45cb07
refactor: connection manager
nekohasekai Nov 20, 2024
8ce40f7
refactor: WireGuard endpoint
nekohasekai Nov 21, 2024
5821b97
Fix lint
nekohasekai Nov 23, 2024
093e539
Make GSO adaptive
nekohasekai Nov 22, 2024
04cc343
Add UDP timeout route option
nekohasekai Nov 24, 2024
22bda86
Improve timeouts
nekohasekai Nov 27, 2024
11a448b
hysteria2: Add more masquerade options
nekohasekai Nov 28, 2024
01291d1
clash-api: Fix missing endpoints
nekohasekai Dec 6, 2024
c385e7c
Fix socks5 UDP implementation
nekohasekai Dec 10, 2024
74de437
Fix time service
nekohasekai Dec 14, 2024
0a9bf97
Fix domain strategy
nekohasekai Dec 14, 2024
be8ee37
Fix DNS match log
nekohasekai Dec 15, 2024
60fc913
Add `rule-set merge` command
nekohasekai Dec 16, 2024
1ed8f3a
Fix default dialer on legacy xiaomi systems
nekohasekai Dec 21, 2024
f437038
release: Upload debug apks to action
nekohasekai Dec 21, 2024
606ff66
platform: Implement set underlying networks for android
nekohasekai Dec 21, 2024
0c75450
tun: Set address sets to routes
nekohasekai Dec 23, 2024
d9d0a23
Revert "platform: Implement set underlying networks for android"
nekohasekai Dec 26, 2024
ce0fcd5
Fix resolve action incorrectly overwriting UDP domain destination
nekohasekai Dec 28, 2024
48d3021
Add port hopping for hysteria2
nekohasekai Dec 29, 2024
d9579c2
Fix tests
nekohasekai Nov 18, 2024
e483c90
documentation: Bump version
nekohasekai Nov 18, 2024
99ffb46
docs: merge inet4_address and inet6_address into address
p-w-p Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 32 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ jobs:
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle') }}
- name: Build
- name: Build release
if: github.event_name == 'workflow_dispatch'
run: |-
go run -v ./cmd/internal/update_android_version --ci
mkdir clients/android/app/libs
Expand All @@ -267,18 +268,47 @@ jobs:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
- name: Prepare upload
- name: Build debug
if: github.event_name != 'workflow_dispatch'
run: |-
go run -v ./cmd/internal/update_android_version --ci
mkdir clients/android/app/libs
cp libbox.aar clients/android/app/libs
cd clients/android
./gradlew :app:assemblePlayRelease
env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
- name: Prepare release upload
if: github.event_name == 'workflow_dispatch'
run: |-
mkdir -p dist/release
cp clients/android/app/build/outputs/apk/play/release/*.apk dist/release
cp clients/android/app/build/outputs/apk/other/release/*-universal.apk dist/release
- name: Prepare debug upload
if: github.event_name != 'workflow_dispatch'
run: |-
mkdir -p dist/release
cp clients/android/app/build/outputs/apk/play/release/*.apk dist/release
- name: Upload artifact
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: binary-android-apks
path: 'dist'
- name: Upload debug apk (arm64-v8a)
if: github.event_name != 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: "SFA-${{ needs.calculate_version.outputs.version }}-arm64-v8a.apk"
path: 'dist/release/*-arm64-v8a.apk'
- name: Upload debug apk (universal)
if: github.event_name != 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: "SFA-${{ needs.calculate_version.outputs.version }}-universal.apk"
path: 'dist/release/*-universal.apk'
publish_android:
name: Publish Android
if: github.event_name == 'workflow_dispatch' && inputs.build == 'publish-android'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ci_build:
go build $(MAIN_PARAMS) $(MAIN)

generate_completions:
go run -v --tags generate,generate_completions $(MAIN)
go run -v --tags $(TAGS),generate,generate_completions $(MAIN)

install:
go build -o $(PREFIX)/bin/$(NAME) $(MAIN_PARAMS) $(MAIN)
Expand Down
104 changes: 0 additions & 104 deletions adapter/conn_router.go

This file was deleted.

14 changes: 14 additions & 0 deletions adapter/connections.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package adapter

import (
"context"
"net"

N "github.com/sagernet/sing/common/network"
)

type ConnectionManager interface {
Lifecycle
NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
}
28 changes: 28 additions & 0 deletions adapter/endpoint.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package adapter

import (
"context"

"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)

type Endpoint interface {
Lifecycle
Type() string
Tag() string
Outbound
}

type EndpointRegistry interface {
option.EndpointOptionsRegistry
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) (Endpoint, error)
}

type EndpointManager interface {
Lifecycle
Endpoints() []Endpoint
Get(tag string) (Endpoint, bool)
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) error
}
43 changes: 43 additions & 0 deletions adapter/endpoint/adapter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package endpoint

import "github.com/sagernet/sing-box/option"

type Adapter struct {
endpointType string
endpointTag string
network []string
dependencies []string
}

func NewAdapter(endpointType string, endpointTag string, network []string, dependencies []string) Adapter {
return Adapter{
endpointType: endpointType,
endpointTag: endpointTag,
network: network,
dependencies: dependencies,
}
}

func NewAdapterWithDialerOptions(endpointType string, endpointTag string, network []string, dialOptions option.DialerOptions) Adapter {
var dependencies []string
if dialOptions.Detour != "" {
dependencies = []string{dialOptions.Detour}
}
return NewAdapter(endpointType, endpointTag, network, dependencies)
}

func (a *Adapter) Type() string {
return a.endpointType
}

func (a *Adapter) Tag() string {
return a.endpointTag
}

func (a *Adapter) Network() []string {
return a.network
}

func (a *Adapter) Dependencies() []string {
return a.dependencies
}
Loading